Open ghost opened 3 years ago
So it turns out the issue is happening due to spaces in the portgroup name. ie. "portgroup_name": "Test - 192.168.20.0_24 - VMotion - 1",
Any ideas on how to correct that at module level or how can i escape the values with spaces?
Seems that if i use portgroup_name as display_name and its name has spaces or special chars it will fail. NSX-T accepts Segments with spaces, should the ansible module not allow it also?
My data sample looks like this:
TASK [list port_groups] *** task path: /root/scripts/nsx-t/script4/nsxt-automation/1.yaml:25 ok: [127.0.0.1] => { "port_groups": [ { "portgroup_name": "Test - 192.168.20.0_24 - VMotion - 1", "vlan_id": "20" }, { "portgroup_name": "Test - 192.168.60.0_24 - Management", "vlan_id": "0" }, { "portgroup_name": "Test - 192.168.30.0_24 - VSAN", "vlan_id": "25" }, { "portgroup_name": "DVS-Dev-Ork2-DVUplinks-11", "vlan_id": [ "0-4094" ] } ] }
This fails:
This works:
Error: TASK [Create Segments] **** task path: /root/scripts/nsx-t/script4/nsxt-automation/1.yaml:38