- name: Install nginx community.general.apk: name: nginx - name: Remove default nginx site config ansible.builtin.file: path: /etc/nginx/http.d/default.conf state: absent - name: Install nginx config ansible.builtin.copy: src: nginx.conf dest: /etc/nginx/nginx.conf - name: Install fastcgi_params ansible.builtin.copy: src: fastcgi_params dest: /etc/nginx/fastcgi_params - name: Install mime.types ansible.builtin.copy: src: mime.types dest: /etc/nginx/mime.types - name: Start nginx service and configure to restart on boot ansible.builtin.service: name: nginx enabled: true state: started - name: Install script to update nginx ansible.builtin.copy: src: update_nginx dest: /usr/bin/update_nginx mode: "755" - name: Install daily crontab to update nginx ansible.builtin.cron: special_time: daily name: Update nginx job: /usr/bin/update_nginx