diff --git a/roles/common/molecule/default/prepare.yml b/roles/common/molecule/default/prepare.yml index c205858aedc3818f36d4ff1752b6c1826cf659d1..89d70e19002bf8f9524d57712ff0258eee9ad6ed 100644 --- a/roles/common/molecule/default/prepare.yml +++ b/roles/common/molecule/default/prepare.yml @@ -1,6 +1,6 @@ --- -- name: Set-up fixtures +- name: Prepare, test fixtures hosts: localhost connection: local gather_facts: false @@ -20,18 +20,14 @@ - 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 -- hosts: all - become: true - tasks: - - name: Update all caches to avoid errors due to missing remote archives apt: update_cache: true @@ -42,7 +38,13 @@ name: net-tools state: present -- hosts: helper + - name: Remove the ss utility (see https://github.com/philpep/testinfra/pull/320) + file: + path: "/bin/ss" + state: absent + +- name: Prepare, helpers + hosts: helper become: true tasks: @@ -51,7 +53,8 @@ name: apt-cacher-ng state: present -- hosts: client +- name: Prepare, helpers + hosts: client become: true tasks: @@ -75,7 +78,8 @@ fd00::192:168:56:21: parameters-mandatory-bookworm fd00::192:168:56:22: parameters-optional-bookworm -- hosts: parameters-mandatory,parameters-optional +- name: Prepare, test fixtures + hosts: parameters-mandatory,parameters-optional become: true tasks: @@ -156,12 +160,3 @@ - ntp - ntpdate state: present - -- hosts: parameters-mandatory,parameters-optional - become: true - tasks: - - - name: Remove the ss utility (see https://github.com/philpep/testinfra/pull/320) - file: - path: "/bin/ss" - state: absent