W3cubDocs

/Ansible

vcenter_license - Manage VMware vCenter license keys

New in version 2.4.

Synopsis

  • Add and delete vCenter license keys.

Requirements (on host that executes module)

  • pyVmomi

Options

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
  • absent
  • present
Whether to add (present) or remove (absent) the license key.
username
yes
The username to log into the vSphere vCenter.
aliases: admin, user

Examples

- 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

Return Values

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']

Notes

Note

  • This module will also auto-assign the current vCenter to the license key if the product matches the license key, and vCenter us currently assigned an evaluation license only.
  • The evaluation license (00000-00000-00000-00000-00000) is not listed when unused.

Status

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