You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been running restconf_get module against nxos 9.3(1) and 7.0(3)I7(8)) but I see no ouput when the playbook running, however, it seems like playbook runs OK. Just F.Y.I it works fine on IOSXE and I do see output for any restconf call on iosxe but dont see it on nxos unfortunately
It should be the get request output, in my case name of the device
ACTUAL RESULTS
[ansible@vCentOS vsansible]$ ansible-playbook -i hosts playbooks/restconf_nxos.yml -vvv
ansible-playbook 2.9.16
config file = /opt/ansible/vsansible/ansible.cfg
configured module search path = ['/opt/ansible/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /opt/ansible/.local/lib/python3.6/site-packages/ansible
executable location = /opt/ansible/.local/bin/ansible-playbook
python version = 3.6.8 (default, Aug 10 2019, 06:54:07) [GCC 4.8.5 20150623 (Red Hat 4.8.5-36)]
Using /opt/ansible/vsansible/ansible.cfg as config file
host_list declined parsing /opt/ansible/vsansible/hosts as it did not pass its verify_file() method
script declined parsing /opt/ansible/vsansible/hosts as it did not pass its verify_file() method
auto declined parsing /opt/ansible/vsansible/hosts as it did not pass its verify_file() method
Parsed /opt/ansible/vsansible/hosts inventory source with ini plugin
Skipping callback 'actionable', 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: restconf_nxos.yml ****************************************************************************************
1 plays in playbooks/restconf_nxos.yml
PLAY [Restconf playbook for nxos] **********************************************************************************
META: ran handlers
TASK [Get NXOS device hostname] ************************************************************************************
task path: /opt/ansible/vsansible/playbooks/restconf_nxos.yml:28
Sunday 18 July 2021 04:47:18 +0100 (0:00:00.088) 0:00:00.088 ***********
<sbx-nxos-mgmt.cisco.com> Attempting python interpreter discovery
<sbx-nxos-mgmt.cisco.com> ESTABLISH LOCAL CONNECTION FOR USER: ansible
<sbx-nxos-mgmt.cisco.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'
<sbx-nxos-mgmt.cisco.com> EXEC /bin/sh -c '/usr/bin/python && sleep 0'
Using module file /opt/ansible/.ansible/collections/ansible_collections/ansible/netcommon/plugins/modules/restconf_get.py
Pipelining is enabled.
<sbx-nxos-mgmt.cisco.com> EXEC /bin/sh -c '/usr/bin/python && sleep 0'
ok: [sbx-nxos-mgmt.cisco.com] => {
"ansible_facts": {
"discovered_interpreter_python": "/usr/bin/python"
},
"changed": false,
"invocation": {
"module_args": {
"content": "all",
"output": "json",
"path": "/data/Cisco-NX-OS-device:System/name"
}
},
"response": ""
}
TASK [debug] *******************************************************************************************************
task path: /opt/ansible/vsansible/playbooks/restconf_nxos.yml:34
Sunday 18 July 2021 04:47:20 +0100 (0:00:02.190) 0:00:02.278 ***********
<sbx-nxos-mgmt.cisco.com> ESTABLISH HTTP(S) CONNECTFOR USER: admin TO https://sbx-nxos-mgmt.cisco.com:443
ok: [sbx-nxos-mgmt.cisco.com] => {
"restconf_output": {
"ansible_facts": {
"discovered_interpreter_python": "/usr/bin/python"
},
"changed": false,
"failed": false,
"response": ""
}
}
META: ran handlers
META: ran handlers
PLAY RECAP *********************************************************************************************************
sbx-nxos-mgmt.cisco.com : ok=2 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
Sunday 18 July 2021 04:47:22 +0100 (0:00:01.069) 0:00:03.348 ***********
===============================================================================
Get NXOS device hostname ------------------------------------------------------------------------------------ 2.19s
/opt/ansible/vsansible/playbooks/restconf_nxos.yml:28 -------------------------------------------------------------
debug ------------------------------------------------------------------------------------------------------- 1.07s
/opt/ansible/vsansible/playbooks/restconf_nxos.yml:34 -------------------------------------------------------------
The text was updated successfully, but these errors were encountered:
@muhammad-rafi you are right, Cisco uses "application/yang.data+xml" in NXOS 9.3.10 and says they are implementing RESTCONF Protocol draft-ietf-netconf-restconf-10.
SUMMARY
I have been running restconf_get module against nxos 9.3(1) and 7.0(3)I7(8)) but I see no ouput when the playbook running, however, it seems like playbook runs OK. Just F.Y.I it works fine on IOSXE and I do see output for any restconf call on iosxe but dont see it on nxos unfortunately
ISSUE TYPE
Results are not as expected
COMPONENT NAME
ansible.netcommon.restconf_get
ANSIBLE VERSION
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
NXOS 7.0(3)I7(8) and 9.3(3)
STEPS TO REPRODUCE
Use my playbook below to reproduce this, this is against publicly available Cisco nxos sandbox
EXPECTED RESULTS
It should be the get request output, in my case name of the device
ACTUAL RESULTS
The text was updated successfully, but these errors were encountered: