--- - name: Prepare hosts: all gather_facts: False tasks: - name: Install python for Ansible raw: test -e /usr/bin/python || (apt -y update && apt install -y python-minimal) become: True changed_when: False - hosts: all become: yes tasks: - name: Update all caches to avoid errors due to missing remote archives apt: update_cache: yes changed_when: False