--- - name: NGINX site config template: src: nginx.conf dest: /etc/nginx/sites-available/pxe owner: root group: root mode: "0644" become: true notify: nginx_restart - name: NGINX remove default config ansible.builtin.file: path: /etc/nginx/sites-enabled/default state: absent notify: nginx_restart - name: NGINX enable site ansible.builtin.file: src: /etc/nginx/sites-available/pxe dest: /etc/nginx/sites-enabled/pxe state: link notify: nginx_restart