Developer Community

Reply
Highlighted
Occasional Contributor I

AOS-CX Role in Ansible issue

Hi,

 

Starting new topic (original post https://community.arubanetworks.com/t5/Developer-Community/AOS-CX-Ansible-Role-in-Galaxy/td-p/550650)

 

I am trying to test the Ansible module for CX in my lab with the 10.04 OVA, but I have a hard time to get the basic connection to work.

 

I first added the role to my existing Linux Mint test host, that gave me error below.

Then I installed a clean, new Ubuntu 18.04LTS host, followed the instructions of the other article (https://community.arubanetworks.com/t5/Developer-Community/How-to-Install-Ansible-and-Aruba-Ansible-Modules-on-Ubuntu-18-04/m-p/555488)

 

But when I try the basic L3 port or the vlan config example, the play shows an error. When I run it with the verbose option, I get this error output:

 

 

An exception occurred during task execution. To see the full traceback, use -vvv. The error was: AttributeError: 'NoneType' object has no attribute 'has_key'
fatal: [sw-access1]: FAILED! => {"changed": false, "module_stderr": "Traceback (most recent call last):\
  File \"/home/labadmin/.ansible/tmp/ansible-local-10451VX2f6D/ansible-tmp-1573554454.14-69301531100280/AnsiballZ_aoscx_vlan.py\", line 102, in <module>\n
    _ansiballz_main()
  File \"/home/labadmin/.ansible/tmp/ansible-local-10451VX2f6D/ansible-tmp-1573554454.14-69301531100280/AnsiballZ_aoscx_vlan.py\", line 94, in _ansiballz_main\n    
invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
  File \"/home/labadmin/.ansible/tmp/ansible-local-10451VX2f6D/ansible-tmp-1573554454.14-69301531100280/AnsiballZ_aoscx_vlan.py\", line 40, in invoke_module
    runpy.run_module(mod_name='ansible.modules.aoscx_vlan', init_globals=None, run_name='__main__', alter_sys=False)\n
  File \"/usr/lib/python2.7/runpy.py\", line 192, in run_module
    fname, loader, pkg_name)
  File \"/usr/lib/python2.7/runpy.py\", line 72, in _run_code
    exec code in run_globals
  File \"/tmp/ansible_aoscx_vlan_payload_CU2cXY/ansible_aoscx_vlan_payload.zip/ansible/modules/aoscx_vlan.py\", line 146, in <module>
  File \"/tmp/ansible_aoscx_vlan_payload_CU2cXY/ansible_aoscx_vlan_payload.zip/ansible/modules/aoscx_vlan.py\", line 106, in main
  File \"/tmp/ansible_aoscx_vlan_payload_CU2cXY/ansible_aoscx_vlan_payload.zip/ansible/module_utils/aoscx_vlan.py\", line 29, in create_vlan
AttributeError: 'NoneType' object has no attribute 'has_key'
", "module_stdout": "", "msg": "MODULE FAILURE
See stdout/stderr for the exact error", "rc": 1}

I have tried this with the role installed from Github and from Ansible Galaxy. I have tried to remove the role and re-install it. It always gave me the error above.

 

I ran a tcpdump and the ansible host is not even attempting to connect to the target system, so something seems wrong with my local installation.

 

Any clues on what I'm missing?


Accepted Solutions
Highlighted

Re: AOS-CX Role in Ansible issue

Hello!

 

I believe this was an issue introduced with the new 2.9 Ansible version, I just uploaded a fix on to the aoscx-role ! If you could re-install the latest version, and re-test, we can see if that resolved your issue!

 

https://galaxy.ansible.com/arubanetworks/aoscx_role

View solution in original post


All Replies
Highlighted

Re: AOS-CX Role in Ansible issue

Hello!

 

I believe this was an issue introduced with the new 2.9 Ansible version, I just uploaded a fix on to the aoscx-role ! If you could re-install the latest version, and re-test, we can see if that resolved your issue!

 

https://galaxy.ansible.com/arubanetworks/aoscx_role

View solution in original post

Highlighted
Occasional Contributor I

Re: AOS-CX Role in Ansible issue

Thank you Tiffany,

The new version 1.0.5 works fine!

 

Search Airheads
cancel
Showing results for 
Search instead for 
Did you mean: