New in version 2.4.
| parameter | required | default | choices | comments |
|---|---|---|---|---|
| hostname | yes | The hostname or IP address of the vSphere vCenter. | ||
| labels | no | The optional labels of the license key to manage in vSphere vCenter. This is dictionary with key/value pair. | ||
| license | yes | The license key to manage in vSphere vCenter. | ||
| password | yes | The password to log into to the vSphere vCenter. aliases: pass, pwd | ||
| state | no | present |
| Whether to add ( present) or remove (absent) the license key. |
| username | yes | The username to log into the vSphere vCenter. aliases: admin, user |
- name: Add a new vCenter license
vcenter_license:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
license: f600d-21ae3-5592b-249e0-cc341
state: present
delegate_to: localhost
- name: Remove an (unused) vCenter license
vmware_license:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
license: f600d-21ae3-5592b-249e0-cc341
state: absent
delegate_to: localhost
Common return values are documented here Return Values, the following are the fields unique to this module:
| name | description | returned | type | sample |
|---|---|---|---|---|
| licenses | list of license keys after module executed | always | list | ['f600d-21ae3-5592b-249e0-cc341', '143cc-0e942-b2955-3ea12-d006f'] |
Note
This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.
For help in developing on modules, should you be so inclined, please read Community Information & Contributing, Testing Ansible and Developing Modules.
© 2012–2017 Michael DeHaan
© 2017 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/vcenter_license_module.html