'ansible - error trying to gather facts from arista.eos and cisco.nxos
I am working to try to start using Ansible to manage Arista and Cisco gear in a large network. I have a Linux VM I use for testing and the goal is to use the corporate Ansible Tower for actual production. On the Corporate Ansible tower whenever I try to do a fact collection - whether via get_facts = yes at the top or specifically calling correct OS. Here is the full debug of a failed session. Any insight into how to troubleshoot is greatly appreciated.
ansible-playbook 2.9.26
config file = /etc/ansible/ansible.cfg
configured module search path = ['/var/lib/awx/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python3.6/site-packages/ansible
executable location = /usr/bin/ansible-playbook
python version = 3.6.8 (default, Sep 9 2021, 07:49:02) [GCC 8.5.0 20210514 (Red Hat 8.5.0-3)]
Using /etc/ansible/ansible.cfg as config file
SSH password:
setting up inventory plugins
host_list declined parsing /tmp/awx_135809_70v2akah/tmpoawu9ax7 as it did not pass its verify_file() method
Parsed /tmp/awx_135809_70v2akah/tmpoawu9ax7 inventory source with script plugin
Loading callback plugin awx_display of type stdout, v2.0 from /var/lib/awx/venv/awx/lib/python3.6/site-packages/ansible_runner/callbacks/awx_display.py
Skipping callback 'actionable', as we already have a stdout callback.
Skipping callback 'awx_display', as we already have a stdout callback.
Skipping callback 'counter_enabled', as we already have a stdout callback.
Skipping callback 'debug', as we already have a stdout callback.
Skipping callback 'dense', as we already have a stdout callback.
Skipping callback 'dense', as we already have a stdout callback.
Skipping callback 'full_skip', as we already have a stdout callback.
Skipping callback 'json', as we already have a stdout callback.
Skipping callback 'minimal', as we already have a stdout callback.
Skipping callback 'null', as we already have a stdout callback.
Skipping callback 'oneline', as we already have a stdout callback.
Skipping callback 'selective', as we already have a stdout callback.
Skipping callback 'skippy', as we already have a stdout callback.
Skipping callback 'stderr', as we already have a stdout callback.
Skipping callback 'unixy', as we already have a stdout callback.
Skipping callback 'yaml', as we already have a stdout callback.
PLAYBOOK: gather_network_facts.yml *********************************************
Positional arguments: gather_network_facts.yml
verbosity: 4
ask_pass: True
remote_user: y_spitzern
connection: smart
timeout: 10
become: True
become_method: enable
tags: ('all',)
inventory: ('/tmp/awx_135809_70v2akah/tmpoawu9ax7',)
subset: DC11P-NET-B11-M0-SW
extra_vars: ('@/tmp/awx_135809_70v2akah/env/extravars',)
forks: 1
1 plays in gather_network_facts.yml
PLAY [Gather Facts] ************************************************************
META: ran handlers
TASK [eos_command] *************************************************************
task path: /tmp/awx_135809_70v2akah/project/gather_network_facts.yml:11
<DC11P-NET-B11-M0-SW.net.leidos.com> attempting to start connection
<DC11P-NET-B11-M0-SW.net.leidos.com> using connection plugin ansible.netcommon.network_cli
<DC11P-NET-B11-M0-SW.net.leidos.com> local domain socket does not exist, starting it
<DC11P-NET-B11-M0-SW.net.leidos.com> control socket path is /var/lib/awx/.ansible/pc/7828535f39
<DC11P-NET-B11-M0-SW.net.leidos.com> local domain socket listeners started successfully
<DC11P-NET-B11-M0-SW.net.leidos.com> loaded cliconf plugin eos from path /usr/lib/python3.6/site-packages/ansible/plugins/cliconf/eos.py for network_os eos
<DC11P-NET-B11-M0-SW.net.leidos.com> ssh type is set to paramiko
<DC11P-NET-B11-M0-SW.net.leidos.com>
<DC11P-NET-B11-M0-SW.net.leidos.com> local domain socket path is /var/lib/awx/.ansible/pc/7828535f39
<DC11P-NET-B11-M0-SW.net.leidos.com> Using network group action eos for eos_command
<DC11P-NET-B11-M0-SW.net.leidos.com> ANSIBLE_NETWORK_IMPORT_MODULES: disabled
<DC11P-NET-B11-M0-SW.net.leidos.com> ANSIBLE_NETWORK_IMPORT_MODULES: module execution time may be extended
<DC11P-NET-B11-M0-SW.net.leidos.com> ESTABLISH LOCAL CONNECTION FOR USER: awx
<DC11P-NET-B11-M0-SW.net.leidos.com> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /var/lib/awx/.ansible/tmp/ansible-local-322389flf13a6_ `"&& mkdir "` echo /var/lib/awx/.ansible/tmp/ansible-local-322389flf13a6_/ansible-tmp-1652446573.70434-322397-270476835609674 `" && echo ansible-tmp-1652446573.70434-322397-270476835609674="` echo /var/lib/awx/.ansible/tmp/ansible-local-322389flf13a6_/ansible-tmp-1652446573.70434-322397-270476835609674 `" ) && sleep 0'
<DC11P-NET-B11-M0-SW> Attempting python interpreter discovery
<DC11P-NET-B11-M0-SW.net.leidos.com> EXEC /bin/sh -c 'echo PLATFORM; uname; echo FOUND; command -v '"'"'/usr/bin/python'"'"'; command -v '"'"'python3.7'"'"'; command -v '"'"'python3.6'"'"'; command -v '"'"'python3.5'"'"'; command -v '"'"'python2.7'"'"'; command -v '"'"'python2.6'"'"'; command -v '"'"'/usr/libexec/platform-python'"'"'; command -v '"'"'/usr/bin/python3'"'"'; command -v '"'"'python'"'"'; echo ENDFOUND && sleep 0'
<DC11P-NET-B11-M0-SW.net.leidos.com> EXEC /bin/sh -c '/usr/bin/python3.6 && sleep 0'
Using module file /tmp/awx_135809_70v2akah/requirements_collections/ansible_collections/arista/eos/plugins/modules/eos_command.py
<DC11P-NET-B11-M0-SW.net.leidos.com> PUT /var/lib/awx/.ansible/tmp/ansible-local-322389flf13a6_/tmpo9mxjyce TO /var/lib/awx/.ansible/tmp/ansible-local-322389flf13a6_/ansible-tmp-1652446573.70434-322397-270476835609674/AnsiballZ_eos_command.py
<DC11P-NET-B11-M0-SW.net.leidos.com> EXEC /bin/sh -c 'chmod u+x /var/lib/awx/.ansible/tmp/ansible-local-322389flf13a6_/ansible-tmp-1652446573.70434-322397-270476835609674/ /var/lib/awx/.ansible/tmp/ansible-local-322389flf13a6_/ansible-tmp-1652446573.70434-322397-270476835609674/AnsiballZ_eos_command.py && sleep 0'
<DC11P-NET-B11-M0-SW.net.leidos.com> EXEC /bin/sh -c '/usr/libexec/platform-python /var/lib/awx/.ansible/tmp/ansible-local-322389flf13a6_/ansible-tmp-1652446573.70434-322397-270476835609674/AnsiballZ_eos_command.py && sleep 0'
<DC11P-NET-B11-M0-SW.net.leidos.com> EXEC /bin/sh -c 'rm -f -r /var/lib/awx/.ansible/tmp/ansible-local-322389flf13a6_/ansible-tmp-1652446573.70434-322397-270476835609674/ > /dev/null 2>&1 && sleep 0'
The full traceback is:
File "/tmp/ansible_eos_command_payload_yamwhixq/ansible_eos_command_payload.zip/ansible_collections/arista/eos/plugins/module_utils/network/eos/eos.py", line 174, in run_commands
commands=commands, check_rc=check_rc
File "/tmp/ansible_eos_command_payload_yamwhixq/ansible_eos_command_payload.zip/ansible/module_utils/connection.py", line 185, in __rpc__
raise ConnectionError(to_text(msg, errors='surrogate_then_replace'), code=code)
fatal: [DC11P-NET-B11-M0-SW]: FAILED! => {
"ansible_facts": {
"discovered_interpreter_python": "/usr/libexec/platform-python"
},
"changed": false,
"invocation": {
"module_args": {
"commands": [
"logout"
],
"interval": 1,
"match": "all",
"provider": null,
"retries": 10,
"wait_for": null
}
},
"msg": "send_command() got an unexpected keyword argument 'version'"
}
PLAY RECAP *********************************************************************
DC11P-NET-B11-M0-SW : ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|