--- - name: Converge hosts: all become: true vars: certbot_install_from_source: true certbot_auto_renew_user: root pre_tasks: - name: Update apt cache. apt: name: - python3-apt update_cache: true cache_valid_time: 600 when: ansible_os_family == 'Debian' changed_when: false - name: Install cron (RedHat). yum: name: cronie state: present when: ansible_os_family == 'RedHat' - name: Install dependencies (Debian). apt: name: - cron - python-setuptools - python3-apt - python3-setuptools state: present when: ansible_os_family == 'Debian' roles: - geerlingguy.git - thiagoalmeidasa.certbot-route53