--- - name: Install NGINX & modules package: name: - nginx - libnginx-mod-http-lua - libnginx-mod-http-geoip state: present tags: - role::nginx - name: Copy NGINX default config copy: src: default_server.conf dest: /etc/nginx/conf.d/default_server.conf group: root owner: root mode: "0644" tags: - role::nginx notify: - Reload the nginx service - name: Remove default nginx site file: path: /etc/nginx/sites-enabled/default state: absent - name: Copy file server config copy: src: files.pydis.wtf dest: /etc/nginx/sites-available/files.pydis.wtf group: root owner: root mode: "0644" tags: - role::nginx notify: - Reload the nginx service - name: Enable file server file: src: /etc/nginx/sites-available/files.pydis.wtf dest: /etc/nginx/sites-enabled/files.pydis.wtf state: link