diff --git a/molecule/test/scenarios/dependency/molecule/ansible-galaxy/converge.yml b/molecule/test/scenarios/dependency/molecule/ansible-galaxy/converge.yml index 6c7339c52..aa6c67868 100644 --- a/molecule/test/scenarios/dependency/molecule/ansible-galaxy/converge.yml +++ b/molecule/test/scenarios/dependency/molecule/ansible-galaxy/converge.yml @@ -7,3 +7,7 @@ - name: Validate that collection was installed debug: msg: "{{ 'foo' | community.molecule.header }}" + + - name: test installed role + include_role: + name: ssbarnea.ansible_role_helloworld diff --git a/molecule/test/scenarios/dependency/molecule/ansible-galaxy/molecule.yml b/molecule/test/scenarios/dependency/molecule/ansible-galaxy/molecule.yml index 7420c15c5..fda5adf64 100644 --- a/molecule/test/scenarios/dependency/molecule/ansible-galaxy/molecule.yml +++ b/molecule/test/scenarios/dependency/molecule/ansible-galaxy/molecule.yml @@ -8,8 +8,6 @@ platforms: image: ${TEST_BASE_IMAGE} provisioner: name: ansible - env: - ANSIBLE_ROLES_PATH: ../../../../../resources/roles/ scenario: name: ansible-galaxy verifier: diff --git a/molecule/test/scenarios/dependency/molecule/ansible-galaxy/requirements.yml b/molecule/test/scenarios/dependency/molecule/ansible-galaxy/requirements.yml index 07a414160..be1c1b6dd 100644 --- a/molecule/test/scenarios/dependency/molecule/ansible-galaxy/requirements.yml +++ b/molecule/test/scenarios/dependency/molecule/ansible-galaxy/requirements.yml @@ -1,4 +1,5 @@ # See https://docs.ansible.com/ansible/latest/galaxy/user_guide.html#installing-roles-and-collections-from-the-same-requirements-yml-file collections: - community.molecule -roles: [] +roles: + - ssbarnea.ansible_role_helloworld diff --git a/molecule/test/scenarios/dependency/molecule/shell/converge.yml b/molecule/test/scenarios/dependency/molecule/shell/converge.yml index 6c7339c52..aa6c67868 100644 --- a/molecule/test/scenarios/dependency/molecule/shell/converge.yml +++ b/molecule/test/scenarios/dependency/molecule/shell/converge.yml @@ -7,3 +7,7 @@ - name: Validate that collection was installed debug: msg: "{{ 'foo' | community.molecule.header }}" + + - name: test installed role + include_role: + name: ssbarnea.ansible_role_helloworld diff --git a/molecule/test/scenarios/dependency/molecule/shell/molecule.yml b/molecule/test/scenarios/dependency/molecule/shell/molecule.yml index e404c8418..0c6f1c465 100644 --- a/molecule/test/scenarios/dependency/molecule/shell/molecule.yml +++ b/molecule/test/scenarios/dependency/molecule/shell/molecule.yml @@ -2,7 +2,10 @@ dependency: name: shell command: > - ansible-galaxy collection install -p "${MOLECULE_EPHEMERAL_DIRECTORY}/collections" community.molecule + bash -c " + ansible-galaxy collection install -p '${MOLECULE_EPHEMERAL_DIRECTORY}/collections' community.molecule && + ansible-galaxy role install -p '${MOLECULE_EPHEMERAL_DIRECTORY}/roles' ssbarnea.ansible_role_helloworld + " driver: name: delegated platforms: @@ -10,8 +13,6 @@ platforms: image: ${TEST_BASE_IMAGE} provisioner: name: ansible - env: - ANSIBLE_ROLES_PATH: ../../../../../resources/roles/ scenario: name: shell verifier: