--- - name: Make directory for the config files for {{website}} we are about to copy ansible.builtin.file: path=/etc/httpd/conf.d/{{website}} state=directory owner=root group=root mode=0755 tags: - haproxy - haproxy/rewrite - ansible.builtin.template: src=rewrite.conf dest=/etc/httpd/conf.d/{{website}}/haproxy.conf notify: - Reload httpd tags: - haproxy - haproxy/rewrite when: not inventory_hostname.startswith('proxy') - ansible.builtin.template: src=rewrite.conf dest=/etc/httpd/conf.d/{{website}}/haproxy.conf notify: - Reload proxyhttpd tags: - haproxy - haproxy/rewrite when: inventory_hostname.startswith('proxy')