Command Not found but module is installed

186 views
Skip to first unread message

Fiend Busa

unread,
Oct 21, 2020, 10:31:07 AM10/21/20
to Ansible Project
---
- hosts: all
  gather_facts: false
  connection: local
  become: yes
  become_method: enable

  collections:
    - arubanetworks.aos_switch

  tasks:
    - name: Show running configuration
      arubaoss_command:
        commands: ['show run']

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

Server where ansible is installed tells me its already installed

phil.gr...@gmail.com

unread,
Oct 21, 2020, 2:57:12 PM10/21/20
to Ansible Project
what happens when you use the FQCN (fully qualified collection name) as part of the task? arubanetworks.aos_switch.arubaoss_command:

Fiend Busa

unread,
Oct 21, 2020, 4:10:16 PM10/21/20
to Ansible Project
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


Jorge Rúa

unread,
Oct 21, 2020, 4:14:12 PM10/21/20
to ansible...@googlegroups.com
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?  

--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/d6965e56-6a75-41d3-838b-88f8418f4d7dn%40googlegroups.com.

Phil Griffiths

unread,
Oct 21, 2020, 4:16:08 PM10/21/20
to ansible...@googlegroups.com
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?

--
You received this message because you are subscribed to a topic in the Google Groups "Ansible Project" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ansible-project/3vYUd0vit2Q/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ansible-proje...@googlegroups.com.

Fiend Busa

unread,
Oct 22, 2020, 9:48:23 AM10/22/20
to Ansible Project
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/

Fiend Busa

unread,
Oct 22, 2020, 10:09:26 AM10/22/20
to Ansible Project

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

Phil Griffiths

unread,
Oct 22, 2020, 10:52:22 AM10/22/20
to ansible...@googlegroups.com
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

Message has been deleted

Fiend Busa

unread,
Oct 22, 2020, 1:10:26 PM10/22/20
to Ansible Project
Hey,

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

ls -all in this directory gives me

ansible
arubanetworks
check_point
cisco
community
fortinet 

Phil Griffiths

unread,
Oct 22, 2020, 4:08:19 PM10/22/20
to ansible...@googlegroups.com
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. 

On Thu, 22 Oct 2020 at 18:09, Fiend Busa <ggil...@gmail.com> wrote:
ansible-galaxy collection list doesn't work. No such argument list
On Thursday, October 22, 2020 at 10:52:22 AM UTC-4 phil.gr...@gmail.com wrote:

Phil Griffiths

unread,
Oct 22, 2020, 4:09:45 PM10/22/20
to ansible...@googlegroups.com
Check file permissions? 
Also try ansible-doc -l | grep aruba to see if it can find those modules 

Fiend Busa

unread,
Oct 23, 2020, 9:56:21 AM10/23/20
to Ansible Project
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

Fiend Busa

unread,
Oct 23, 2020, 9:57:43 AM10/23/20
to Ansible Project
Im running ansible through AWX if that makes a difference.

Fiend Busa

unread,
Oct 23, 2020, 10:18:38 AM10/23/20
to Ansible Project
Ok i was able to update to 2.10

ansible-galaxy collection list does indeed show

arubanetworks.aos_switch

phil.gr...@gmail.com

unread,
Oct 23, 2020, 11:15:38 AM10/23/20
to Ansible Project
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.

Fiend Busa

unread,
Oct 23, 2020, 12:25:21 PM10/23/20
to Ansible Project
:O

Sorry haha, I will try that, fingers crossed!

Fiend Busa

unread,
Oct 23, 2020, 12:56:24 PM10/23/20
to Ansible Project
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

---

collections:


- name: arubanetworks.aos_switch


Then I have a playbook:


---

- hosts: all

gather_facts: false

connection: localhost



collections:

- arubanetworks.aos_switch



tasks:

- name: Execute show run on the switch

arubanetworks.aos_switch.arubaoss_command:

commands: ['sh run']  

Phil Griffiths

unread,
Oct 23, 2020, 2:45:18 PM10/23/20
to ansible...@googlegroups.com
Hummm. I suggest you try the same mechanism with 1) a different module from the same collection and 2) a different collection

Fiend Busa

unread,
Oct 23, 2020, 3:02:58 PM10/23/20
to Ansible Project
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.
Reply all
Reply to author
Forward
0 new messages