Prerequisites
Environment
molecule 25.4.0 using python 3.13
ansible:2.18.3
gce:23.7.0 from molecule_plugins requiring collections: google.cloud>=1.0.2 community.crypto>=1.8.0
default:25.4.0 from molecule
containers:23.7.0 from molecule_plugins requiring collections: ansible.posix>=1.3.0 community.docker>=1.9.1 containers.podman>=1.8.1
vagrant:23.7.0 from molecule_plugins
openstack:23.7.0 from molecule_plugins requiring collections: openstack.cloud>=2.1.0
podman:23.7.0 from molecule_plugins requiring collections: containers.podman>=1.7.0 ansible.posix>=1.3.0
azure:23.7.0 from molecule_plugins
ec2:23.7.0 from molecule_plugins
docker:23.7.0 from molecule_plugins requiring collections: community.docker>=3.10.2 ansible.posix>=1.4.0
What happened
If you have to specifiy ansible-galaxy options in the dependency stage, the options are passed to both collection and role commands. For example, If I set --collections-path option and provide both requirements.yml and collections.yml files, then the dependency stage applies --collections-path to ansible-galaxy role install, in which this option does not exist for role installs.
Reproducing example
dependency:
name: "galaxy"
options:
force: true
collections-path: ../.ansible/collections
requirements-file: ./collections.yml
driver:
name: "docker"
provisioner:
name: "ansible"
playbooks:
prepare: ../default/prepare.yml
converge: ../default/converge.yml
verify: ../default/verify.yml
connection_options:
ansible_become: true
env:
ANSIBLE_COLLECTIONS_PATH: ../../../.ansible/collections
verifier:
name: "ansible"
platforms:
- name: "molecule-rhel8"
image: registry.redhat.io/ubi8/ubi:latest
privileged: true
Prerequisites
pip checkdoes not report any conflictsEnvironment
molecule 25.4.0 using python 3.13
ansible:2.18.3
gce:23.7.0 from molecule_plugins requiring collections: google.cloud>=1.0.2 community.crypto>=1.8.0
default:25.4.0 from molecule
containers:23.7.0 from molecule_plugins requiring collections: ansible.posix>=1.3.0 community.docker>=1.9.1 containers.podman>=1.8.1
vagrant:23.7.0 from molecule_plugins
openstack:23.7.0 from molecule_plugins requiring collections: openstack.cloud>=2.1.0
podman:23.7.0 from molecule_plugins requiring collections: containers.podman>=1.7.0 ansible.posix>=1.3.0
azure:23.7.0 from molecule_plugins
ec2:23.7.0 from molecule_plugins
docker:23.7.0 from molecule_plugins requiring collections: community.docker>=3.10.2 ansible.posix>=1.4.0
What happened
If you have to specifiy ansible-galaxy options in the dependency stage, the options are passed to both
collectionandrolecommands. For example, If I set--collections-pathoption and provide bothrequirements.ymlandcollections.ymlfiles, then the dependency stage applies--collections-pathtoansible-galaxy role install, in which this option does not exist for role installs.Reproducing example