diff --git a/roles/bootstrap/molecule/default/prepare.yml b/roles/bootstrap/molecule/default/prepare.yml index f03d4f5d4175634a32df11c26577179983e34278..7f1c268a76b571a1cedb0cf1578a7267ac17c11e 100644 --- a/roles/bootstrap/molecule/default/prepare.yml +++ b/roles/bootstrap/molecule/default/prepare.yml @@ -2,15 +2,22 @@ - name: Prepare hosts: all + become: true gather_facts: false tasks: + - name: Install python for Ansible raw: test -e /usr/bin/python3 || (apt -y update && apt install -y python3-minimal) - become: true + changed_when: false + + - name: Update all caches to avoid errors due to missing remote archives + apt: + update_cache: true changed_when: false # Put Ansible key into root's authorized_keys to test its removal. -- hosts: parameters-mandatory +- name: Prepare, text fixtures + hosts: parameters-mandatory become: true tasks: @@ -20,7 +27,8 @@ key: "{{ lookup('file', '~/.ssh/id_rsa.pub') }}" # Put Ansible key into root's authorized_keys to test its removal. -- hosts: parameters-optional +- name: Prepare, text fixtures + hosts: parameters-optional become: true tasks: