cannot resolve community modules

Can anyone help with this?

I have had this problem with all community AWS modules:

ERROR! couldn’t resolve module/action ‘community.aws.ec2_eip’. This often indicates a misspelling, missing collection, or incorrect module path.

3

4
The error appears to be in ‘/runner/project/attachip.yml’: line 7, column 5, but may

5
be elsewhere in the file depending on the exact syntax problem.

6

7
The offending line appears to be:

8

9

10

  • name: associate elastic IP with instance

11
^ here

Anyone help on this one?

With execution environments this maybe harder to guess at than before.

For starters I’d ask the following;
What version of Ansible are you running in your execution environment?
Per the docs at https://docs.ansible.com/ansible/latest/collections/community/aws/ec2_eip_module.html:
You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

Can you check and see if the community.general collection is installed in your EE.
Do you have a requirements.yml that is supposed to be pulling the collection in on the project sync? If so, were there any issues with the project sync? If not, can you confirm that the collection is downloaded?

-John

Hey

ansible [core 2.11.5.post0]
config file = None
configured module search path = [‘/home/runner/.ansible/plugins/modules’, ‘/usr/share/ansible/plugins/modules’]
ansible python module location = /usr/local/lib/python3.8/site-packages/ansible
ansible collection location = /home/runner/.ansible/collections:/usr/share/ansible/collections
executable location = /usr/local/bin/ansible
python version = 3.8.6 (default, Jan 29 2021, 17:38:16) [GCC 8.4.1 20200928 (Red Hat 8.4.1-1)]
jinja version = 2.10.3
libyaml = True

I can see some modules installed from community.general installed, but does not install anything else on-demand.

Which location of my SCM is requirements.yml meant to be? No issues with project sync

Cheers

There are two files. One for roles and one for collections both are documents in the projects section of the Tower user guide. Specifically for collections see:
https://docs.ansible.com/ansible-tower/latest/html/userguide/projects.html#collections-support

-John