Open Sneedes opened 5 years ago
Noting...is the related to my my_vlans list? The docs say that vlans_list is a list of VLANs...with name, native, and state. Any way related to my list having an id element in this case?
- { id: '99', name: 'VLAN0099-My-VLAN', native: 'no'}
I believe you answered your own question, the 'id' is not a valid property. I'm assuming thats your VLAN id...you must create the VLANs before creating the vnic templates. VLAN creation is where the ID is specified.
ucs_vlans: <<: *login_info name: Data_VLAN id: '11'
But can I not provide a list/dictionary as the vlans_list that happens to contain more properties than required? I'm trying to be lazy and consistent by using a single variable to create the vlans as well as assign the exact same list to the vnic template.
Here's how I do this. Don't know if it helps.
demo_lan_conn:
Attempting to add vlans to a VNIC template.
Results in "setup error: 'NoneType' object has no attribute 'status'" error.
`
Here's a snippet from the execution of the play:
` Using module file /usr/lib/python2.7/site-packages/ansible/modules/remote_management/ucs/ucs_vnic_template.py
The full traceback is: WARNING: The below traceback may not be related to the actual failure. File "/tmp/ansible_ucs_vnic_template_payload_CV5HWj/main.py", line 354, in main ucs.login_handle.remove_mo(mo_1) File "/usr/lib/python2.7/site-packages/ucsmsdk/ucshandle.py", line 696, in remove_mo mo.status = "deleted"
fatal: [ucsm.hostname.com]: FAILED! => { "ansible_facts": { "discovered_interpreter_python": "/usr/bin/python" }, "changed": false, "invocation": { "module_args": { "cdn_name": "", "cdn_source": "vnic-name", "description": "", "fabric": "A", "hostname": "ucsm.hostname.com", "mac_pool": "", "mtu": "1500", "name": "vm-network-a", "network_control_policy": "", "org_dn": "org-root/org-MyCluster", "password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "peer_redundancy_template": "", "pin_group": "", "port": null, "proxy": null, "qos_policy": "", "redundancy_type": "none", "state": "present", "stats_policy": "default", "target": "adaptor", "template_type": "initial-template", "use_proxy": true, "use_ssl": true, "username": "admin", "vlans_list": [ { "id": "99", "name": "VLAN0099-My-VLAN", "native": "no", "state": "present" } ] } }, "msg": "setup error: 'NoneType' object has no attribute 'status' " } `