--- - name: Configure proxy for {{ domain }} to {{ backend_port is defined | ternary(backend_port, backend_socket) }} template: src: proxy.conf dest: "{{ nginx_sites_directory }}/{{ domain }}" owner: root group: root mode: "u=rw,g=r,o=r" notify: reload nginx