I like to use a git based Ansible Collection with my role and try to test that role with molecule. But when I run molecule, there isno output showing me, it is adding that collection nor it find the module/filter during runtime.
molecule 4.0.4 using python 3.9
ansible:2.14.1
delegated:4.0.4 from molecule
docker:2.1.0 from molecule_docker requiring collections: community.docker>=3.0.2 ansible.posix>=1.4.0
The molecule.yml contains
---
dependency:
name: galaxy
options:
requirements-file: collections.yml
...
And the collections.yml contains:
---
collections:
- name: https://github.com/acoby/ansible-collection.git
type: git
version: main
During the converge tests, I'm using a filter, that is available in that collection, but it only says:
$ molecule test
INFO default scenario test matrix: dependency, lint, cleanup, destroy, syntax, create, prepare, converge, idempotence, side_effect, verify, cleanup, destroy
INFO Performing prerun with role_name_check=0...
INFO Set ANSIBLE_LIBRARY=/homedir/.cache/ansible-compat/0ad1ad/modules:/homedir/.ansible/plugins/modules:/usr/share/ansible/plugins/modules
INFO Set ANSIBLE_COLLECTIONS_PATH=/homedir/.cache/ansible-compat/0ad1ad/collections:/homedir/.ansible/collections:/usr/share/ansible/collections
INFO Set ANSIBLE_ROLES_PATH=/homedir/.cache/ansible-compat/0ad1ad/roles:/homedir/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles
INFO Using /homedir/.cache/ansible-compat/0ad1ad/roles/acoby.common symlink to current repository in order to enable Ansible to find the role using its expected full name.
INFO Running default > dependency
WARNING Skipping, missing the requirements file.
WARNING Skipping, missing the requirements file.
INFO Running default > lint
INFO Lint is disabled.
INFO Running default > cleanup
WARNING Skipping, cleanup playbook not configured.
INFO Running default > destroy
INFO Sanity checks: 'docker'
PLAY [Destroy] *****************************************************************
...
INFO Running default > syntax
playbook: /homedir/git/github/ansible-common/molecule/default/converge.yml
INFO Running default > create
PLAY [Create] ******************************************************************
...
PLAY RECAP *********************************************************************
localhost : ok=6 changed=2 unreachable=0 failed=0 skipped=5 rescued=0 ignored=0
INFO Running default > prepare
WARNING Skipping, prepare playbook not configured.
INFO Running default > converge
PLAY [Converge] ****************************************************************
TASK [Gathering Facts] *********************************************************
ok: [instance]
....
An exception occurred during task execution.
To see the full traceback, use -vvv. The error was: #eof.
Could not load "acoby.collection.my_urlencode":
'Invalid plugin FQCN (acoby.collection.my_urlencode):
unable to locate collection acoby.collection'
failed: [instance] (item={'src': 'mail.rc.j2', 'dest': '/root/.mailrc', 'mode': '0440'})
...
Has somebody an idea, what is wrong? Why is the molecule run ignoring my collectiony.yml and is not installing it. There was in issue before molecule 3.0.3, but that seems to be fixed.