Last few days i am playing with cisco nexus switch to deploy config using nxos
ansible modules to make it automate.
I am running n3000-uk9-kickstart.6.0.2.U6.6.bin
software and here is my playbook snippet where i am trying to configure switch ports.
- name: L2 config for all ports
nxos_switchport: interface={{ item }} mode=trunk trunk_vlans=10-11
with_items:
- Ethernet1/49
- Ethernet1/50
my whole playbook run clean without issue but i am only seeing following change, it didn't configure allowed vlans
interface Ethernet1/49
switchport mode trunk
interface Ethernet1/50
switchport mode trunk
if this module doesn't work then what other option i have? is there any module i can run and execute arbitrary command line by like?
Best Answer
Finally end up using following module, not pretty but doing what it need to do