--- - name: install nginx apt: name: nginx state: present tags: nginx - name: disable default site file: path: /etc/nginx/sites-enabled/default state: absent notify: restart nginx tags: nginx - name: copy includes copy: src: etc/nginx/include dest: /etc/nginx mode: 0644 owner: root group: root notify: restart nginx tags: nginx - name: copy nginx.conf copy: src: etc/nginx/nginx.conf dest: /etc/nginx mode: 0644 owner: root group: root backup: yes notify: restart nginx tags: nginx