Skip to content

Instantly share code, notes, and snippets.

@NilashishC
Created September 4, 2023 15:03
Show Gist options
  • Save NilashishC/f5237487dd9e6615a6c596e03735c9d3 to your computer and use it in GitHub Desktop.
Save NilashishC/f5237487dd9e6615a6c596e03735c9d3 to your computer and use it in GitHub Desktop.
# Using overridden
--------------------
Before config:
-----------------
interface fc1/1
switchport description INTF-1
switchport speed 1000
interface fc1/2
switchport description INTF-2
switchport speed 2000
interface fc1/3
switchport description INTF-3
switchport speed 4000
- name: Overridden for FC Interfaces
cisco.nxos.nxos_fc_interfaces:
config:
- name: fc1/1
description: "NEW_INTF_1"
state: overridden
commands:
- interface fc1/1
- no switchport speed 1000
- switchport description NEW_INTF_1
- interface fc1/2
- no switchport description INTF_2
- no switchport speed 2000
- interface fc1/3
- no switchport description INTF_3
- no switchport speed 4000
After config:
-----------------
interface fc1/1
description NEW_INTF_1
interface fc1/2
interface fc1/3
# Using replaced
--------------------
Before config:
-----------------
interface fc1/1
switchport description INTF-1
switchport speed 1000
interface fc1/2
switchport description INTF-2
switchport speed 2000
interface fc1/3
switchport description INTF-3
switchport speed 4000
- name: Replaced for FC Interfaces
cisco.nxos.nxos_fc_interfaces:
config:
- name: fc1/1
description: "NEW_INTF_1"
state: replaced
commands:
- interface fc1/1
- no switchport speed 1000
- switchport description NEW_INTF_1
After config:
-----------------
interface fc1/1
description NEW_INTF_1
interface fc1/2
switchport description INTF-2
switchport speed 2000
interface fc1/3
switchport description INTF-3
switchport speed 4000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment