vmware_guest_custom_attribute_defs – Manage custom attributes definitions for virtual machine from VMware¶
New in version 2.7.
Synopsis¶
- This module can be used to add and remove custom attributes definitions for the given virtual machine from VMware.
Requirements¶
The below requirements are needed on the host that executes this module.
- python >= 2.6
- PyVmomi
Parameters¶
Examples¶
- name: Add VMware Attribute Definition
vmware_guest_custom_attribute_defs:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
state: present
attribute_key: custom_attr_def_1
delegate_to: localhost
register: defs
- name: Remove VMware Attribute Definition
vmware_guest_custom_attribute_defs:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
state: absent
attribute_key: custom_attr_def_1
delegate_to: localhost
register: defs
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Key | Returned | Description |
---|---|---|
custom_attribute_defs
list
|
always |
list of all current attribute definitions
Sample:
['sample_5', 'sample_4']
|
Status¶
- This module is not guaranteed to have a backwards compatible interface. [preview]
- This module is maintained by the Ansible Community. [community]
Authors¶
- Jimmy Conner (@cigamit)
- Abhijeet Kasurde (@Akasurde)
Hint
If you notice any issues in this documentation, you can edit this document to improve it.