--- - name: Prepare hosts: all tasks: - name: Update apt cache apt: update_cache: true when: ansible_os_family == "Debian" - name: Ensure /etc/cron.d exists (missing in some Docker images) file: path: /etc/cron.d state: directory