Questions tagged [cisco-nxos]
8 questions
1
vote
1 answer
Ansible assert match string from output
I have a playbook to retrieve show version output from a Cisco NX-OS switch and using assert_module.
I want to match a string "NXOS: version 9.3(6)" in the output. If succeeds, then print success message, or else fail message. With the below scripts…

har83
- 33
- 1
- 8
0
votes
0 answers
Ansible - cisco.nxos.nxos_banner module - can't use '@' in banner
I have the following task in my ansible playbook:
- name: MOTD NX
hosts: lab_nxos
gather_facts: false
connection: local
become: false
tasks:
- name: add motd
cisco.nxos.nxos_banner:
banner: motd
text: "{{…

William McGuire
- 1
- 2
0
votes
0 answers
Advice on how to create a SLA/track function with scripting on Cisco Nexus switch
I have this Nexus 5596 chassis that doesn't support SLA configuration. I want to create a static route only if TCP on port 80 is open for another IP. I got the similar thing working on a Nexus 9K with a TCP-type SLA and a track and EEM that monitors…

Difan Zhao
- 379
- 6
- 20
0
votes
0 answers
Ansible for event automation with Cisco Nessus device. need to extract past 15 minutes logs from show clock of the device
What I am trying to achieve with this ansible code: Ansible code should be triggered during an interface flapping with cisco nessus device. It should fetch the time of nessus device(show clock) and try to pull the past 15 minutes from the "show…

Inlovewithansible
- 17
- 4
0
votes
0 answers
ansible ssh connection issue with cisco nxos after upgrade to 9.3(9) software release
I am using an Ansible Server to connect to a Cisco NXOS Switch (N93180LC). The connection runs over paramiko using ssh user/password and has always worked without a problem until I upgraded from 9.3(8) to 9.3(9) software release. When I downgrade…
0
votes
2 answers
Ansible - Copy command output to file for multiple hosts
I run a playbook with a single command against multiple Cisco Nexus hosts. For all hosts, I want to store the output of the commands in a single file on the controller.
---
- name: Nxos
hosts:
- sw1
- sw2
gather_facts: false
tasks:
…

jays7110
- 11
- 2
- 5
-1
votes
1 answer
Nexus 3k route ACL on L3 interface
Testing ACL on nexus 3k switches. Very simple setup. Two switches, R1 and R2. Linked with each other over layer3 interfaces Eth1/1.
Trying to use ACL r1r2 to block the traffic from R1 loopback1 to R2 loopback2 without any luck. No hit showing on the…

Wukong
- 11
- 4
-1
votes
1 answer
How to connect to Cisco NX-OS switch using Ansible in Ubuntu?
I want to call ansible all -m ping to Cisco NX-OS switch (v9.x) using Ansible 2.10.8 in Ubuntu 22.04 (Python3.10.6).
But an error occurred like below
DS2 | UNREACHABLE! => {
"changed": false,
"msg": "Failed to create temporary directory. In…

network
- 11
- 6