--- # Note that changing the domain leaves the old config in place - name: Copy Nginx site config become: true template: src: nginx.conf.j2 dest: /etc/nginx/sites-available/{{ domain }} - name: Copy extra Nginx site config become: true template: src: ph-extra-nginx.conf.j2 dest: /etc/nginx/sites-available/extra-{{ domain }} - name: Activate Nginx site config become: true file: state: link src: /etc/nginx/sites-available/{{ domain }} path: /etc/nginx/sites-enabled/{{ domain }} notify: - validate nginx - reload nginx