-
Notifications
You must be signed in to change notification settings - Fork 347
Open
Description
SUMMARY
When updating/editing an existing Category associable_object_types the current present state sees the Category already exists and just skips it.
ISSUE TYPE
- Add Update option to state
COMPONENT NAME
community.vmware.vmware_category
ADDITIONAL INFORMATION
So lets say we have a Category called Lab that has the associable_object_types set to VM. Now we want to be able to add hosts to that same Category. The current states of "present and absent" will not update the Category and just goes on because the Category already exists.
Create Lab Category with type of VM
- name: Create Lab category VM
community.vmware.vmware_category:
hostname: '{{ lookup("env", "VMWARE_HOST") }}'
username: '{{ lookup("env", "VMWARE_USER") }}'
password: '{{ lookup("env", "VMWARE_PASSWORD") }}'
validate_certs: false
category_name: 'Lab'
category_description: ''
associable_object_types: "Virtual Machine"
state: present
Update Lab Category to add type Host to the already existing Lab Category. This just see it exists and does nothing..
- name: Update Lab category to include hosts now
community.vmware.vmware_category:
hostname: '{{ lookup("env", "VMWARE_HOST") }}'
username: '{{ lookup("env", "VMWARE_USER") }}'
password: '{{ lookup("env", "VMWARE_PASSWORD") }}'
validate_certs: false
category_name: 'Lab'
category_description: ''
associable_object_types: "Host"
state: presentReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels