# nxos failure on 9k when removing vlan (nxos\_vlan absent)

**URL:** <https://forum.ansible.com/t/nxos-failure-on-9k-when-removing-vlan-nxos-vlan-absent/29547>\
**Category:** Ansible Developer\
**Created:** [January 28, 2019, 3:59pm UTC](https://forum.ansible.com/t/nxos-failure-on-9k-when-removing-vlan-nxos-vlan-absent/29547 "2019-01-28T15:59:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rick\_Williams](https://avatars.discourse-cdn.com/v4/letter/r/f17d59/32.png) [@Rick\_Williams](https://forum.ansible.com/u/Rick_Williams)\
**Post date:** [January 28, 2019, 3:59pm UTC](https://forum.ansible.com/t/nxos-failure-on-9k-when-removing-vlan-nxos-vlan-absent/29547/1 "2019-01-28T15:59:53Z")

</div>

Hi all,

I’m running into problems with nxos\_vlan vlan removal on cisco nexus 9K. Works ok on 5k. For the 9k, ansible seems to try VXLAN commands when not configured for VXLAN.

“10.6.0.81”: {  
“\_ansible\_no\_log”: false,  
“\_ansible\_parsed”: true,  
“action”: “nxos\_vlan”,  
“changed”: false,  
“failed”: true,  
“invocation”: {  
“module\_args”: {  
“admin\_state”: “up”,  
“aggregate”: null,  
“associated\_interfaces”: null,  
“auth\_pass”: null,  
“authorize”: null,  
“delay”: 10,  
“host”: null,  
“interfaces”: null,  
“mapped\_vni”: null,  
“mode”: null,  
“name”: “DEPTTEST-SF-TEST-dmz2”,  
“password”: null,  
“port”: null,  
“provider”: null,  
“purge”: false,  
“ssh\_keyfile”: null,  
“state”: “absent”,  
“timeout”: null,  
“transport”: null,  
“use\_ssl”: null,  
“username”: null,  
“validate\_certs”: null,  
“vlan\_id”: 53,  
“vlan\_range”: null,  
“vlan\_state”: “active”  
}  
},  
“msg”: "no vn-segment\r\r\n ^\r\n% Invalid command at ‘^’ marker.\r\n\rEDC-SF-LAB-9504-81(config-vlan)# "

Here’s a 5k result:

“10.6.0.78”: {  
“\_ansible\_no\_log”: false,  
“\_ansible\_parsed”: true,  
“action”: “nxos\_vlan”,  
“changed”: true,  
“commands”: [  
“no vlan 53”  
],  
“invocation”: {  
“module\_args”: {  
“admin\_state”: “up”,  
“aggregate”: null,  
“associated\_interfaces”: null,  
“auth\_pass”: null,  
“authorize”: null,  
“delay”: 10,  
“host”: null,  
“interfaces”: null,  
“mapped\_vni”: null,  
“mode”: null,  
“name”: “DEPTTEST-SF-TEST-dmz2”,  
“password”: null,  
“port”: null,  
“provider”: null,  
“purge”: false,  
“ssh\_keyfile”: null,  
“state”: “absent”,  
“timeout”: null,  
“transport”: null,  
“use\_ssl”: null,  
“username”: null,  
“validate\_certs”: null,  
“vlan\_id”: 53,  
“vlan\_range”: null,  
“vlan\_state”: “active”  
}  
}  
},

Does this seem like a bug ?

Regards,

Rick

---

<div class="post-metadata">

**Author:** ![psprygad](https://avatars.discourse-cdn.com/v4/letter/p/e8c25b/32.png) [@psprygad](https://forum.ansible.com/u/psprygad)\
**Post date:** [January 28, 2019, 9:53pm UTC](https://forum.ansible.com/t/nxos-failure-on-9k-when-removing-vlan-nxos-vlan-absent/29547/2 "2019-01-28T21:53:51Z")

</div>

Yes, it would appear so. Could you open an issue at [https://github.com/ansible/ansible/issues](https://github.com/ansible/ansible/issues)
