diff --git a/roles/wsgi_website/molecule/default/prepare.yml b/roles/wsgi_website/molecule/default/prepare.yml index 8ce1940a144d63a9a2d8b7f91149abae6b878fbf..576b25f7ade46c2e578b0f3fb24e3828f5af047a 100644 --- a/roles/wsgi_website/molecule/default/prepare.yml +++ b/roles/wsgi_website/molecule/default/prepare.yml @@ -1,6 +1,6 @@ --- -- name: Set-up fixtures +- name: Prepare, test fixtures hosts: localhost connection: local gather_facts: false @@ -40,22 +40,29 @@ - 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: wsgi-website - become: true - tasks: - - name: Update all caches to avoid errors due to missing remote archives apt: update_cache: true changed_when: false + - name: Remove the ss utility (see https://github.com/philpep/testinfra/pull/320) + file: + path: "/bin/ss" + state: absent + +- name: Prepare, test fixtures + hosts: wsgi-website + become: true + tasks: + - name: Set-up /etc/hosts entries lineinfile: dest: /etc/hosts @@ -118,11 +125,6 @@ group: user shell: /bin/bash - - name: Remove the ss utility (see https://github.com/philpep/testinfra/pull/320) - file: - path: "/bin/ss" - state: absent - handlers: - name: Restart Postfix