-
Notifications
You must be signed in to change notification settings - Fork 656
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make molecule work with ansible-base #2755
Comments
There are serious issues with ansible wheels with 2.10 especially related to upgrading from 2.9.x but they have nothing to do with molecule itself. We cannot start using FQCN until we drop support for 2.8, which would be after 2.10 is GA. At this moment we cannot really make molecule depend on ansible-base as we have modules that need full ACD. Still, once we move them out of core and we also move minimal version to 2.10, we could switch to requiring ansible-base. In case it was not obvious this cannot be sooner than one year from now. |
Acknowledged; it's going to be a bit of a mess trying to debug playbook-level issues that arise between ansible, ansible-base, and ansible 2.9 and lower in the meanwhile :-/ |
Ansible 2.10 has been released ! https://groups.google.com/g/ansible-announce/c/QxIOml3i62A |
Yep, but we will be able to add dependency on ansible-base only when we drop support for 2.9, which will happen when 2.11 is released. |
Since 3.1.3 this is already true, molecule no longer needs ansible. |
How did you get this to work? Does molecule support ansible 2.10? I figured out that I have to because molecule_docker/playbooks/destroy.yml uses docker_container: instead of community.docker.docker_container:? Or is there some way to get the ansible docker modules in a "legacy" format? |
We must keep the short names for backwards compatibility but please add a PR to add the "collections:" bit which is ignored on older ansible versions. |
@richm Things are a bit complicated at the moment because the docker Ansible content is in transition between the
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. |
Thanks for the details @tadeboro. For me, adding this collections:
- name: community.docker
version: ">=1.2.0,<2"
- name: community.general
version: ">=2,<3" |
FYI these aren't an issue with either Ansible 3.0 or 3.1 which include the necessary versions. Only a problem if you have an older version installed in your collections. Ansible 3.0$ ansible-galaxy collection list |grep -e docker -e general
community.docker 1.2.2
community.general 2.0.1 Ansible 3.1$ ansible-galaxy collection list |grep -e docker -e general
community.docker 1.3.0
community.general 2.2.0 |
This solutions is copied from ansible/molecule#2755 (comment)
Issue Type
Molecule and Ansible details
Molecule installation method (one of):
Ansible installation method (one of):
Desired Behavior
I have been doing some testing with both
ansible-base
andansible
, and noticed that Molecule fails to work at all (at least with the default Docker driver) underansible-base
, since it calls thedocker_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 thecommunity.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.
The text was updated successfully, but these errors were encountered: