CiscoUcs / ucsm-ansible

Ansible Modules for Cisco Ucs Managed Blade and Rack servers.
59 stars 43 forks source link

ucs_vnic_template.py - vlans in vlan_list are not getting removed when updating template #46

Closed gve-vse-tim closed 6 years ago

gve-vse-tim commented 6 years ago

I created a vNIC template with a single access VLAN defined in the vlan_list.

Realized I had used a different VLAN name when creating the vlan so I corrected it in the vlan_list.

When I re-ran ansible-playbook, the old name was not removed from the list of VLANs on the vNIC. Only the new VLAN name was added to the vNIC template.

Shouldn't it remove VLANs not defined in the ucs_vnic_template task and add the missing VLANs?

dsoper2 commented 6 years ago

I can see if there's a way to compare the current vlans to the desired ones without adding too much complexity to the code.

SDBrett commented 6 years ago

PR: https://github.com/CiscoUcs/ucsm-ansible/pull/77

dsoper2 commented 6 years ago

SDBrett's PR #77 is now merged. VLANs in vlan_list can be removed with state: absent