Closed jean-christophe-manciot closed 7 years ago
@jean-christophe-manciot we are unable to validate that "" is an existing ansible module.
We are expecting a component name that matches something that can be found in:
Please revise the component name in the description. click here for bot help
nxos_nxapi
Same issue with nxos_command run with "show running-config".
@privateip, @GGabriele, @gundalow, ping. This issue is waiting on your response. click here for bot help
Same issue with nxos_template.
No such issue with any ios_* modules.
Reviewed, this needs fixing for 2.2
@jedelman8, @GGabriele, @privateip, @gundalow, ping. This issue is still waiting on your response. click here for bot help
@jedelman8, @GGabriele, @privateip, @gundalow, ping. This issue is still waiting on your response. click here for bot help
@jedelman8, @GGabriele, @privateip, @gundalow, ping. This issue is still waiting on your response. click here for bot help
@jedelman8, @GGabriele, @privateip, @gundalow, ping. This issue is still waiting on your response. click here for bot help
@privateip With ansible 2.3.0 commit 20161111.3f785ee The issue described in this thread - accessing NX-OS devices - has been fixed for NX-API, not when using CLI/SSH transport, and there some cases where SSH is largely preferable to NX-API:
- name: Enable NX-API
nxos_nxapi:
state: started
sandbox: "{{ sandbox }}"
http: "{{ http.service }}"
http_port: "{{ http.port }}"
https: "{{ https.service }}"
https_port: "{{ https.port }}"
provider: "{{ connections.ssh }}"
register: nxapi
ignore_errors: yes
leads to:
TASK [nxos_init : Enable NX-API] ********************************************************************************************************************************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: socket.timeout
fatal: [NX_OSv_Spine_12]: FAILED! => {"changed": false, "failed": true, "module_stderr": "Traceback (most recent call last):\n File \"/tmp/ansible__qOFX0/ansible_module_nxos_nxapi.py\", line 326, in <module>\n main()\n File \"/tmp/ansible__qOFX0/ansible_module_nxos_nxapi.py\", line 310, in main\n instance = get_instance(module)\n File \"/tmp/ansible__qOFX0/ansible_module_nxos_nxapi.py\", line 157, in get_instance\n resp = module.cli('show nxapi', 'json')\n File \"/tmp/ansible__qOFX0/ansible_modlib.zip/ansible/module_utils/network.py\", line 117, in cli\n File \"/tmp/ansible__qOFX0/ansible_modlib.zip/ansible/module_utils/network.py\", line 148, in connect\n File \"/tmp/ansible__qOFX0/ansible_modlib.zip/ansible/module_utils/nxos.py\", line 267, in connect\n File \"/tmp/ansible__qOFX0/ansible_modlib.zip/ansible/module_utils/shell.py\", line 226, in connect\n File \"/tmp/ansible__qOFX0/ansible_modlib.zip/ansible/module_utils/shell.py\", line 116, in open\n File \"/tmp/ansible__qOFX0/ansible_modlib.zip/ansible/module_utils/shell.py\", line 128, in receive\n File \"/usr/local/lib/python2.7/dist-packages/paramiko/channel.py\", line 615, in recv\n raise socket.timeout()\nsocket.timeout\n", "module_stdout": "", "msg": "MODULE FAILURE"}
although:
ssh admin@172.21.100.12
...
NX_OSv_Spine_11# conf t
Enter configuration commands, one per line. End with CNTL/Z.
NX_OSv_Spine_11(config)# feature nxapi
NX_OSv_Spine_11(config)#
and in ./hosts:
...
[spines]
NX_OSv_Spine_11 ansible_host=172.21.100.11
NX_OSv_Spine_12 ansible_host=172.21.100.12
...
Same issue with nxos_command:
- name: Fetching ARP_Table from the remote node
nxos_command:
provider: "{{ connections.ssh }}"
commands:
- "show ip arp vrf all"
register: table
ignore_errors: yes
leads to:
TASK [nxos_pull_tables : Fetching ARP_Table from the remote node] ***********************************************************************************************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: socket.timeout
fatal: [NX_OSv_Spine_11]: FAILED! => {"changed": false, "failed": true, "module_stderr": "Traceback (most recent call last):\n File \"/tmp/ansible_MPuLPC/ansible_module_nxos_command.py\", line 257, in <module>\n main()\n File \"/tmp/ansible_MPuLPC/ansible_module_nxos_command.py\", line 193, in main\n supports_check_mode=True)\n File \"/tmp/ansible_MPuLPC/ansible_modlib.zip/ansible/module_utils/network.py\", line 112, in __init__\n File \"/tmp/ansible_MPuLPC/ansible_modlib.zip/ansible/module_utils/network.py\", line 148, in connect\n File \"/tmp/ansible_MPuLPC/ansible_modlib.zip/ansible/module_utils/nxos.py\", line 267, in connect\n File \"/tmp/ansible_MPuLPC/ansible_modlib.zip/ansible/module_utils/shell.py\", line 226, in connect\n File \"/tmp/ansible_MPuLPC/ansible_modlib.zip/ansible/module_utils/shell.py\", line 116, in open\n File \"/tmp/ansible_MPuLPC/ansible_modlib.zip/ansible/module_utils/shell.py\", line 128, in receive\n File \"/usr/local/lib/python2.7/dist-packages/paramiko/channel.py\", line 615, in recv\n raise socket.timeout()\nsocket.timeout\n", "module_stdout": "", "msg": "MODULE FAILURE"}
although:
ssh admin@172.21.100.11
...
NX_OSv_Spine_11# conf t
Enter configuration commands, one per line. End with CNTL/Z.
NX_OSv_Spine_11(config)# exit
NX_OSv_Spine_11# sh ip arp vrf all
Flags: * - Adjacencies learnt on non-active FHRP router
+ - Adjacencies synced via CFSoE
# - Adjacencies Throttled for Glean
D - Static Adjacencies attached to down interface
IP ARP Table for all contexts
Total number of entries: 2
Address Age MAC Address Interface
172.21.100.1 00:04:13 5254.009a.a68c mgmt0
172.21.100.12 00:03:22 0000.ab5a.0d00 mgmt0
Fix will go into stable-2.2
@jedelman8, @GGabriele, @privateip, @gundalow, @qalthos, ping. This issue is still waiting on your response. click here for bot help
This repository has been locked. All new issues and pull requests should be filed in https://github.com/ansible/ansible
Please read through the repomerge page in the dev guide. The guide contains links to tools which automatically move your issue or pull request to the ansible/ansible repo.
ISSUE TYPE
COMPONENT NAME
nxos_nxapi nxos_command nxos_template
ANSIBLE VERSION
CONFIGURATION
inventory = ./hosts roles_path = /home/actionmystique/Program-Files/Ubuntu/Ansible/git-Ansible/Roles/roles fact_caching = redis fact_caching_timeout = 86400
OS / ENVIRONMENT
SUMMARY
Running nxos_nxapi triggers an exception, whereas I can manually login into the target node with SSH.
STEPS TO REPRODUCE
Inventory ./hosts:
Structure passed as "provider": connections.ssh Defined in group_vars/nx_osv/connections.yml
Structures http & https Defined in group_vars/nx_osv/http.yml
Role: nxos_init
Playbook: init.yml
EXPECTED RESULTS
Successful nxos_nxapi
ACTUAL RESULTS
Troubleshooting