show running-config interface on nxos not working
See original GitHub issueUsing the playbook below
- hosts: localhost
gather_facts: no
vars:
contents: |
!Command: show running-config interface Ethernet1/1
!Running configuration last done at: Sun Aug 18 23:22:42 2019
!Time: Tue Sep 3 23:25:59 2019
version 7.0(3)I7(6) Bios:version 08.35
interface Ethernet1/1
description *** Peer Link ***
switchport
switchport mode trunk
switchport trunk allowed vlan 1-99,101-199,201-1399,1401-4094
channel-group 1 mode active
no shutdown
tasks:
- debug: msg="the value of contents is {{ contents }}"
- name: Read in parse_genie role
include_role:
name: clay584.parse_genie
- name: Debug Genie Filter
debug:
msg: "{{ contents | parse_genie(command='show running-config interface', os='nxos') }}"
I get this output
ansible-playbook -i my_hosts ./parse_show_run_interface.yml
PLAY [localhost] ***********************************************************************************************************************************************************************************************************************************************************************************************************************************************
TASK [debug] ***************************************************************************************************************************************************************************************************************************************************************************************************************************************************
ok: [localhost] => {
"msg": "the value of pattern.txt is !Command: show running-config interface Ethernet1/1\n!Running configuration last done at: Sun Aug 18 23:22:42 2019\n!Time: Tue Sep 3 23:25:59 2019\n\nversion 7.0(3)I7(6) Bios:version 08.35\n\ninterface Ethernet1/1\n description *** VPC PEER LINK PO1 to JER-LAB-N95KSW2 1/1-2 ***\n switchport\n switchport mode trunk\n switchport trunk allowed vlan 1-99,101-199,201-1399,1401-4094\n channel-group 1 mode active\n no shutdown\n"
}
TASK [Read in parse_genie role] ********************************************************************************************************************************************************************************************************************************************************************************************************************************
TASK [Debug Genie Filter] **************************************************************************************************************************************************************************************************************************************************************************************************************************************
fatal: [localhost]: FAILED! => {"msg": "parse_genie: cli() got an unexpected keyword argument 'output' - Failed to parse command output."}
PLAY RECAP *****************************************************************************************************************************************************************************************************************************************************************************************************************************************************
localhost : ok=1 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
Could you have a look at this, please?
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Cisco Nexus 9000 Series NX-OS Troubleshooting Guide ...
Initial Port Troubleshooting Checklist ; Verify that you have enabled the port by using the no shutdown command. ; Use the show interface...
Read more >Cisco Nexus NX-OS tips and tricks - AboutNetworks.net
Collection of Cisco Nexus NX-OS tips and tricks. Useful for configuration and debugging Cisco Nexus Data-Center switches.
Read more >Monitoring and Troubleshooting Nexus 9000 (standalone ...
Run “show diagnostic result. <options>” to find the test results. Page 17. © 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public....
Read more >NEXUS NX-OS: Useful Commands, CLI Scripting, Hints & Tips ...
Enter configuration commands, one per line. End with CNTL/Z. N5k-UP(config-if)# show run interface ethernet 1/6 !Command: show running-config ...
Read more >Configuration Management - Cisco Nexus 3550-T ... - Exablaze
admin@NX-3550-T# show running-config interface ethernet1 speed 10000 interface ethernet2 speed 10000 switchport mode access switchport ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@tahigash
Thanks! That worked! We can close this now.
Hi @gamename
It seems you are missing interface with show command in the playbook. please change below line and check if you still see the issue.