Closed Nightreaver closed 3 years ago
How did you install your collections? If they are not in one of the default locations, Ansible might have trouble finding them when executed under molecule.
Well it was working earlier - before i did update ansible+molecule and everything. I didnt change any path so it should technically just be the same, no?
Well it was working earlier - before i did update ansible+molecule and everything. I didnt change any path so it should technically just be the same, no?
Well, recent versions of molecule
started isolating things a bit more during testing. And if I remember correctly, limiting what directories are searched for installed collections is one of the things molecule
plays with.
TThey have been installed with ansible-galaxy collection install --collections-path /usr/share/ansible/ansible_collections ...
and you say this is causing issues?
thanks for the hint, it seems you are right. I ran molecule with --debug
and got
ANSIBLE_COLLECTIONS_PATH: /home/dockeruser/.cache/molecule/enable_ntp_client/docker/collections:/home/dockeruser/.ansible/collections:/usr/share/ansible/collections:/etc/ansible/collections
seems thats the path I set in ansible is not recognized ( it was /usr/share/ansible/ansible_collections
) so i changed it to just /usr/share/ansible/collections
and it works again!
So thanks a lot
For others who may stumble across this issue:
An obvious thing to check is you have the collection installed. You can install it with:
ansible-galaxy collection install community.docker
Hello,
i have recently updated my ansible/molecule setup and now im hitting a weird error which it seems i cannot resolve
molecule version:
ansible collections installed
i also tried community.general 2.1.1 with the same results.
My scenario does not contain a create.yml , only
molecule.yml
,converge.yml
Any ideas why I suddenly get this error?