community.network
community.network copied to clipboard
AireOS - Unable to decode JSON
SUMMARY
Can't pass any command to my WLC controller
ISSUE TYPE
- Bug Report
COMPONENT NAME
aireos_command
ANSIBLE VERSION
ansible 2.10.3
config file = /home/florian_lacommare/project-logm-migration-syslog/ansible.cfg
configured module search path = [u'/home/florian_lacommare/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /home/florian_lacommare/.pyenv/versions/ansible2.10/lib/python2.7/site-packages/ansible
executable location = /home/florian_lacommare/.pyenv/versions/ansible2.10/bin/ansible
python version = 2.7.5 (default, Apr 9 2019, 14:30:50) [GCC 4.8.5 20150623 (Red Hat 4.8.5-36)]
CONFIGURATION
DEFAULT_LOG_PATH(/home/florian_lacommare/project-logm-migration-syslog/ansible.cfg) = /home/florian_lacommare/project-logm-migration-syslog/res.log
DEFAULT_TIMEOUT(/home/florian_lacommare/project-logm-migration-syslog/ansible.cfg) = 3
HOST_KEY_CHECKING(/home/florian_lacommare/project-logm-migration-syslog/ansible.cfg) = False
PERSISTENT_COMMAND_TIMEOUT(/home/florian_lacommare/project-logm-migration-syslog/ansible.cfg) = 15
PERSISTENT_CONNECT_TIMEOUT(/home/florian_lacommare/project-logm-migration-syslog/ansible.cfg) = 3
OS / ENVIRONMENT
WLC : 8.0.152.0
STEPS TO REPRODUCE
---
- name: Get logging facts
hosts: all
vars:
ansible_python_interpreter: /usr/bin/env python
gather_facts: no
tasks:
- name: Get infos
community.network.aireos_command:
commands: show sysinfo
[wlc]
Fake_WLC ansible_host=10.yyyy
WLC_Confluence ansible_host=10.xxxxx
[wlc:vars]
ansible_network_os=aireos
ansible_connection=local
logserver_user=mpgco-web
logserver_password=xxxxxxxx
collecteur=10.xxxx
to_remove=10.xxxx
EXPECTED RESULTS
Should issue the command show sysinfo
ACTUAL RESULTS
ansible-playbook -i hosts_wlc change_logging_wlc.yaml -k
/home/florian_lacommare/.pyenv/versions/ansible2.10/lib/python2.7/site-packages/ansible/parsing/vault/__init__.py:44: CryptographyDeprecationWarning: Python 2 is no longer supported by the Python core team. Support for it is now deprecated in cryptography, and will be removed in a future release.
from cryptography.exceptions import InvalidSignature
SSH password:
PLAY [Get logging facts] ****************************************************************************************************************************************************************************************************************
TASK [Get infos] ************************************************************************************************************************************************************************************************************************
fatal: [Fake_WLC]: FAILED! => {"changed": false, "msg": "Unable to decode JSON from response to exec_command('{\"answer\": null, \"command\": \"show sysinfo\", \"prompt\": null}'). Received 'None'.", "rc": 1}
fatal: [WLC_Confluence]: FAILED! => {"changed": false, "msg": "Unable to decode JSON from response to exec_command('{\"answer\": null, \"command\": \"show sysinfo\", \"prompt\": null}'). Received 'None'.", "rc": 1}
PLAY RECAP ******************************************************************************************************************************************************************************************************************************
Fake_WLC : ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
WLC_Confluence : ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
EDIT : And the verbose output
(ansible2.10) [florian_lacommare@script-dc-gnt-m2-01 project-logm-migration-syslog]$ ansible-playbook -i hosts_wlc change_logging_wlc.yaml -k -vvvv
/home/florian_lacommare/.pyenv/versions/ansible2.10/lib/python2.7/site-packages/ansible/parsing/vault/__init__.py:44: CryptographyDeprecationWarning: Python 2 is no longer supported by the Python core team. Support for it is now deprecated in cryptography, and will be removed in a future release.
from cryptography.exceptions import InvalidSignature
ansible-playbook 2.10.3
config file = /home/florian_lacommare/project-logm-migration-syslog/ansible.cfg
configured module search path = [u'/home/florian_lacommare/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /home/florian_lacommare/.pyenv/versions/ansible2.10/lib/python2.7/site-packages/ansible
executable location = /home/florian_lacommare/.pyenv/versions/ansible2.10/bin/ansible-playbook
python version = 2.7.5 (default, Apr 9 2019, 14:30:50) [GCC 4.8.5 20150623 (Red Hat 4.8.5-36)]
Using /home/florian_lacommare/project-logm-migration-syslog/ansible.cfg as config file
SSH password:
setting up inventory plugins
host_list declined parsing /home/florian_lacommare/project-logm-migration-syslog/hosts_wlc as it did not pass its verify_file() method
script declined parsing /home/florian_lacommare/project-logm-migration-syslog/hosts_wlc as it did not pass its verify_file() method
auto declined parsing /home/florian_lacommare/project-logm-migration-syslog/hosts_wlc as it did not pass its verify_file() method
Parsed /home/florian_lacommare/project-logm-migration-syslog/hosts_wlc inventory source with ini plugin
Loading collection community.network from /home/florian_lacommare/.ansible/collections/ansible_collections/community/network
Loading callback plugin default of type stdout, v2.0 from /home/florian_lacommare/.pyenv/versions/ansible2.10/lib/python2.7/site-packages/ansible/plugins/callback/default.pyc
Skipping callback 'anstomlog', as we already have a stdout callback.
Skipping callback 'default', as we already have a stdout callback.
Skipping callback 'json_cb', as we already have a stdout callback.
Skipping callback 'minimal', as we already have a stdout callback.
Skipping callback 'oneline', as we already have a stdout callback.
PLAYBOOK: change_logging_wlc.yaml *******************************************************************************************************************************************************************************************************
Positional arguments: change_logging_wlc.yaml
ask_pass: True
become_method: sudo
inventory: (u'/home/florian_lacommare/project-logm-migration-syslog/hosts_wlc',)
forks: 5
tags: (u'all',)
verbosity: 4
connection: smart
timeout: 3
1 plays in change_logging_wlc.yaml
PLAY [Get logging facts] ****************************************************************************************************************************************************************************************************************
META: ran handlers
TASK [Get infos] ************************************************************************************************************************************************************************************************************************
task path: /home/florian_lacommare/project-logm-migration-syslog/change_logging_wlc.yaml:9
Loading collection ansible.netcommon from /home/florian_lacommare/.ansible/collections/ansible_collections/ansible/netcommon
<10.yy.yy.yy> using connection plugin network_cli (was local)
redirecting (type: connection) ansible.builtin.persistent to ansible.netcommon.persistent
Loading collection ansible.netcommon from /home/florian_lacommare/.ansible/collections/ansible_collections/ansible/netcommon
<10.yy.yy.yy> starting connection from persistent connection plugin
Found ansible-connection at path /home/florian_lacommare/.pyenv/versions/ansible2.10/bin/ansible-connection
<10.xx.xx.xx> using connection plugin network_cli (was local)
redirecting (type: connection) ansible.builtin.persistent to ansible.netcommon.persistent
<10.xx.xx.xx> starting connection from persistent connection plugin
Found ansible-connection at path /home/florian_lacommare/.pyenv/versions/ansible2.10/bin/ansible-connection
<10.xx.xx.xx> local domain socket does not exist, starting it
<10.xx.xx.xx> control socket path is /home/florian_lacommare/.ansible/pc/0bfca5fb50
<10.xx.xx.xx> redirecting (type: connection) ansible.builtin.network_cli to ansible.netcommon.network_cli
<10.xx.xx.xx> Loading collection ansible.netcommon from /home/florian_lacommare/.ansible/collections/ansible_collections/ansible/netcommon
<10.xx.xx.xx> redirecting (type: terminal) ansible.builtin.aireos to community.network.aireos
<10.xx.xx.xx> Loading collection community.network from /home/florian_lacommare/.ansible/collections/ansible_collections/community/network
<10.xx.xx.xx> redirecting (type: cliconf) ansible.builtin.aireos to community.network.aireos
<10.xx.xx.xx> local domain socket listeners started successfully
<10.xx.xx.xx> loaded cliconf plugin ansible_collections.community.network.plugins.cliconf.aireos from path /home/florian_lacommare/.ansible/collections/ansible_collections/community/network/plugins/cliconf/aireos.py for network_os aireos
<10.xx.xx.xx>
<10.xx.xx.xx> local domain socket path is /home/florian_lacommare/.ansible/pc/0bfca5fb50
<10.xx.xx.xx> socket_path: /home/florian_lacommare/.ansible/pc/0bfca5fb50
<10.xx.xx.xx> ESTABLISH LOCAL CONNECTION FOR USER: florian_lacommare
<10.xx.xx.xx> EXEC /bin/sh -c 'echo ~florian_lacommare && sleep 0'
<10.xx.xx.xx> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/florian_lacommare/.ansible/tmp `"&& mkdir "` echo /home/florian_lacommare/.ansible/tmp/ansible-tmp-1605263386.83-6657-53931478447998 `" && echo ansible-tmp-1605263386.83-6657-53931478447998="` echo /home/florian_lacommare/.ansible/tmp/ansible-tmp-1605263386.83-6657-53931478447998 `" ) && sleep 0'
<10.yy.yy.yy> local domain socket does not exist, starting it
<10.yy.yy.yy> control socket path is /home/florian_lacommare/.ansible/pc/05675bc5d6
<10.yy.yy.yy> redirecting (type: connection) ansible.builtin.network_cli to ansible.netcommon.network_cli
<10.yy.yy.yy> Loading collection ansible.netcommon from /home/florian_lacommare/.ansible/collections/ansible_collections/ansible/netcommon
<10.yy.yy.yy> redirecting (type: terminal) ansible.builtin.aireos to community.network.aireos
<10.yy.yy.yy> Loading collection community.network from /home/florian_lacommare/.ansible/collections/ansible_collections/community/network
<10.yy.yy.yy> redirecting (type: cliconf) ansible.builtin.aireos to community.network.aireos
<10.yy.yy.yy> local domain socket listeners started successfully
<10.yy.yy.yy> loaded cliconf plugin ansible_collections.community.network.plugins.cliconf.aireos from path /home/florian_lacommare/.ansible/collections/ansible_collections/community/network/plugins/cliconf/aireos.py for network_os aireos
<10.yy.yy.yy>
<10.yy.yy.yy> local domain socket path is /home/florian_lacommare/.ansible/pc/05675bc5d6
<10.yy.yy.yy> socket_path: /home/florian_lacommare/.ansible/pc/05675bc5d6
<10.yy.yy.yy> ESTABLISH LOCAL CONNECTION FOR USER: florian_lacommare
<10.yy.yy.yy> EXEC /bin/sh -c 'echo ~florian_lacommare && sleep 0'
<10.yy.yy.yy> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/florian_lacommare/.ansible/tmp `"&& mkdir "` echo /home/florian_lacommare/.ansible/tmp/ansible-tmp-1605263386.89-6655-42815342651466 `" && echo ansible-tmp-1605263386.89-6655-42815342651466="` echo /home/florian_lacommare/.ansible/tmp/ansible-tmp-1605263386.89-6655-42815342651466 `" ) && sleep 0'
Using module file /home/florian_lacommare/.ansible/collections/ansible_collections/community/network/plugins/modules/aireos_command.py
Using module file /home/florian_lacommare/.ansible/collections/ansible_collections/community/network/plugins/modules/aireos_command.py
<10.xx.xx.xx> PUT /home/florian_lacommare/.ansible/tmp/ansible-local-957GDHMvs/tmp51L5ea TO /home/florian_lacommare/.ansible/tmp/ansible-tmp-1605263386.83-6657-53931478447998/AnsiballZ_aireos_command.py
<10.yy.yy.yy> PUT /home/florian_lacommare/.ansible/tmp/ansible-local-957GDHMvs/tmpPKGf6x TO /home/florian_lacommare/.ansible/tmp/ansible-tmp-1605263386.89-6655-42815342651466/AnsiballZ_aireos_command.py
<10.xx.xx.xx> EXEC /bin/sh -c 'chmod u+x /home/florian_lacommare/.ansible/tmp/ansible-tmp-1605263386.83-6657-53931478447998/ /home/florian_lacommare/.ansible/tmp/ansible-tmp-1605263386.83-6657-53931478447998/AnsiballZ_aireos_command.py && sleep 0'
<10.yy.yy.yy> EXEC /bin/sh -c 'chmod u+x /home/florian_lacommare/.ansible/tmp/ansible-tmp-1605263386.89-6655-42815342651466/ /home/florian_lacommare/.ansible/tmp/ansible-tmp-1605263386.89-6655-42815342651466/AnsiballZ_aireos_command.py && sleep 0'
<10.xx.xx.xx> EXEC /bin/sh -c '/usr/bin/env python /home/florian_lacommare/.ansible/tmp/ansible-tmp-1605263386.83-6657-53931478447998/AnsiballZ_aireos_command.py && sleep 0'
<10.yy.yy.yy> EXEC /bin/sh -c '/usr/bin/env python /home/florian_lacommare/.ansible/tmp/ansible-tmp-1605263386.89-6655-42815342651466/AnsiballZ_aireos_command.py && sleep 0'
<10.xx.xx.xx> EXEC /bin/sh -c 'rm -f -r /home/florian_lacommare/.ansible/tmp/ansible-tmp-1605263386.83-6657-53931478447998/ > /dev/null 2>&1 && sleep 0'
<10.yy.yy.yy> EXEC /bin/sh -c 'rm -f -r /home/florian_lacommare/.ansible/tmp/ansible-tmp-1605263386.89-6655-42815342651466/ > /dev/null 2>&1 && sleep 0'
fatal: [Fake_WLC]: FAILED! => {
"changed": false,
"invocation": {
"module_args": {
"commands": [
"show sysinfo"
],
"host": null,
"interval": 1,
"match": "all",
"password": null,
"port": null,
"provider": {
"host": null,
"password": null,
"port": null,
"ssh_keyfile": null,
"timeout": null,
"username": null
},
"retries": 10,
"ssh_keyfile": null,
"timeout": null,
"username": null,
"wait_for": null
}
},
"msg": "Unable to decode JSON from response to exec_command('{\"answer\": null, \"command\": \"show sysinfo\", \"prompt\": null}'). Received 'None'.",
"rc": 1
}
fatal: [WLC_Confluence]: FAILED! => {
"changed": false,
"invocation": {
"module_args": {
"commands": [
"show sysinfo"
],
"host": null,
"interval": 1,
"match": "all",
"password": null,
"port": null,
"provider": {
"host": null,
"password": null,
"port": null,
"ssh_keyfile": null,
"timeout": null,
"username": null
},
"retries": 10,
"ssh_keyfile": null,
"timeout": null,
"username": null,
"wait_for": null
}
},
"msg": "Unable to decode JSON from response to exec_command('{\"answer\": null, \"command\": \"show sysinfo\", \"prompt\": null}'). Received 'None'.",
"rc": 1
}
PLAY RECAP ******************************************************************************************************************************************************************************************************************************
Fake_WLC : ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
WLC_Confluence : ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
Files identified in the description: None
If these files are inaccurate, please update the component name
section of the description or use the !component
bot command.
Files identified in the description:
If these files are inaccurate, please update the component name
section of the description or use the !component
bot command.
We can repro this on 2.9.10 as well
Greetings, due to Cisco's recent announcement to EOL the AireOS WLC, I wouldn't expect any open AireOS issues to be addressed. Cisco has formally invested in DNA Center modules as part of a formal Collection, and AireOS I believe is still supported:
https://galaxy.ansible.com/cisco/dnac
https://www.cisco.com/c/en/us/support/cloud-systems-management/dna-center/products-device-support-tables-list.html
https://blogs.cisco.com/networking/after-15-years-cisco-wireless-aireos-controllers-are-going-away
https://www.cisco.com/c/en/us/products/collateral/wireless/virtual-wireless-controller/eos-eol-notice-c51-744428.html
I found I had this error until I installed the Python package ansible-pylibssh
(otherwise, the return string from the server would complain it was defaulting to Paramiko).
I installed the module as common user and it did not resolve the issue. Although there is no warning anymore about paramiko.
As a side note: The units willbe supprted for another 4 years. So they will not go away soon.