Command Not found but module is installed

what happens when you use the FQCN (fully qualified collection name) as part of the task? arubanetworks.aos_switch.arubaoss_command:

Hey,

I get the same error:

ERROR! couldn’t resolve module/action ‘arubanetworks.aos_switch.arubaoss_command’. This often indicates a misspelling, missing collection, or incorrect module path.

12

13

Can we assume you’re running an ansible version compatible with collections?
What’s collection_path on your ansible.cfg ?
Have you tried running it with -vvv?

Ok, so this is suggesting that it can’t find it on the default collections path to me. Do you have an ansible.cfg with anything in it for collections and where did you install the collection?

Hey,

So all the collections are being installed in ~/.ansible/collections/

ansible CFG is located in /etc/ansible.cfg

I have other collections as well (cisco.asa) it’s only the aruba one that is giving this error. I installed the collection directly on the ubuntu server and can see it under ~/.ansible/collections/

I can see ~./.ansible/collections/arubanetworks/aos_switch/plugins/modules/arubaoss_command.py

what does ‘ansible-galaxy collection list’ output? mine are under ~/.ansible/collections/ansible_collections
what ansible version you on?

I’m not convinced that collection is complete as some of those modules don’t have docs that render for me using ansible-doc

Hey,

Mine are all under: ~/.ansible/collections/ansible_collections

ls -all in this directory gives me

ansible
arubanetworks
check_point
cisco
community
fortinet

I suggest you update ansible so you get support for list. It also has a verify option now as well so you’ll find it useful in these situations.

Check file permissions?
Also try ansible-doc -l | grep aruba to see if it can find those modules

I tried updating ansible but it keeps installing version 2.9.6 every time and not 2.10

As for ansible-doc -l | grep aruba

I get the following:

aruba_command
aruba_config
aruba_module_installer

Im running ansible through AWX if that makes a difference.

Ok i was able to update to 2.10

ansible-galaxy collection list does indeed show

arubanetworks.aos_switch

Yes that’ll make all the difference! You should have logged this issue against the awx group and given the full info upfront, so we could get to this point a lot quicker!
You don’t need to install that collection locally first when using with awx. Just drop a requirements.yml file into a repo with your playbooks so AWX can pick it up and do the install in the right place for you. See my example here: https://github.com/ffirg/tower_collection_example You might need to setup the creds for Galaxy in AWX as well so it can authenticate and do the install.

:open_mouth:

Sorry haha, I will try that, fingers crossed!

Im still getting the same error :(!!!

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

in my github I have a file named requirements.yml

Hummm. I suggest you try the same mechanism with 1) a different module from the same collection and 2) a different collection

Will do! Btw I do have a cisco asa collection which I installed locally from the command line on the server with galaxy-install. That one is working great via AWX.