community.vmware.vcenter_standard_key_provider module – Add, reconfigure or remove Standard Key Provider on vCenter server
Note
This module is part of the community.vmware collection (version 3.11.1).
You might already have this collection installed if you are using the ansible
package.
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install community.vmware
.
To use it in a playbook, specify: community.vmware.vcenter_standard_key_provider
.
Synopsis
This module is used for adding, reconfiguring or removing Standard Key Provider on vCenter server. Refer to VMware docs for more information: Standard Key Provider
Parameters
Parameter |
Comments |
---|---|
The hostname or IP address of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable Environment variable support added in Ansible 2.6. |
|
The information of an external key server (KMS).
If
Default: |
|
IP address of the external KMS. |
|
Name of the KMS to be configured. |
|
Port of the external KMS. |
|
Remove the configured KMS with name Choices:
|
|
Password to authenticate to the KMS. |
|
Username to authenticate to the KMS. |
|
After adding the Standard Key Provider to the vCenter Server, you can establish a trusted connection, the exact process depends on the certificates that the key provider accepts, and on your company policy. Three methods implemented here, (1) upload client certificate and private key through This is not set to be mandatory, if not set, please go to vCenter to setup trust connection with KMS manually. |
|
The absolute path on local machine for keeping vCenter generated CSR. Then upload the KMS signed CSR using |
|
The absolute path on local machine for keeping vCenter generated self signed client cert. |
|
The absolute file path of client certificate. Request a certificate and private key from the KMS vendor. The files are X509 files in PEM format. The certificate might be already trusted by the KMS server. |
|
The absolute file path of client private key to be uploaded together with |
|
The absolute file path of KMS signed CSR downloaded from |
|
Set specified Key Provider with name If new added Key Provider is the only key provider in vCenter, then will mark it as default after adding. Choices:
|
|
Name of the Key Provider to be added, reconfigured or removed from vCenter. |
|
The password of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable Environment variable support added in Ansible 2.6. |
|
The port number of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable Environment variable support added in Ansible 2.6. Default: |
|
Address of a proxy that will receive all HTTPS requests and relay them. The format is a hostname or a IP. If the value is not specified in the task, the value of environment variable This feature depends on a version of pyvmomi greater than v6.7.1.2018.12 |
|
Port of the proxy server. |
|
Address of the proxy server to connect to KMS. |
|
If set to If set to Choices:
|
|
The username of the vSphere vCenter or ESXi server. If the value is not specified in the task, the value of environment variable Environment variable support added in Ansible 2.6. |
|
Allows connection when SSL certificates are not valid. Set to If the value is not specified in the task, the value of environment variable Environment variable support added in Ansible 2.6. If set to Choices:
|
Notes
Note
All modules requires API write access and hence is not supported on a free ESXi license.
Examples
- name: Add a new Standard Key Provider with client certificate and private key
community.vmware.vcenter_standard_key_provider:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
name: 'test_standard_kp'
state: 'present'
mark_default: true
kms_info:
- kms_name: test_kms_1
kms_ip: 192.168.1.10
make_kms_trust_vc:
upload_client_cert: "/tmp/test_cert.pem"
upload_client_key: "/tmp/test_cert_key.pem"
register: add_skp_result
- name: Remove the KMS from the key provider cluster
community.vmware.vcenter_standard_key_provider:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
name: 'test_standard_kp'
state: 'present'
kms_info:
- kms_name: test_kms_1
remove_kms: true
register: remove_kms_result
- name: Remove the Standard Key Provider
community.vmware.vcenter_standard_key_provider:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
name: 'test_standard_kp'
state: 'absent'
register: remove_kp_result
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
the Key Provider cluster info Returned: always Sample: |