Make molecule work with ansible-base
See original GitHub issueIssue Type
- Feature request
Molecule and Ansible details
molecule 3.0.4
ansible==2.10.0b1 python==3.7
Molecule installation method (one of):
- pip
Ansible installation method (one of):
- pip
Desired Behavior
I have been doing some testing with both ansible-base
and ansible
, and noticed that Molecule fails to work at all (at least with the default Docker driver) under ansible-base
, since it calls the docker_container
module directly—which is not part of the base distribution anymore.
It would be nice if Molecule were updated to install the community.general
collection and use the community.general.docker_container
module if it detects it is not available… somehow.
This is probably a bit of a niche use case, though, but it would be helpful for me so I could test whether a bug affects ansible-base and ansible (2.10 and later), or just ansible-base or ansible (2.10 and later).
Right now I basically can’t use molecule if I’m testing with ansible-base locally.
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (7 by maintainers)
Thanks for the details @tadeboro. For me, adding this
tests/molecule/default/collections.yml
file fixed the problem (using ansible-base 2.10 and molecule 3.2.3:@richm Things are a bit complicated at the moment because the docker Ansible content is in transition between the
community.general
and thecommunity.docker
collections. If you want to use molecule, these are your options right now:Once community.general 2.0.0 is out, there will be one more valid combination:
Once molecule drops support for Ansible 2.8, we can start using FQCNs. The situation will then change into this:
I hope this helps.