- name: Install nginx community.general.apk: name: nginx - name: Remove default nginx site config register: default_nginx_site ansible.builtin.file: path: /etc/nginx/http.d/default.conf state: absent - 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