vmware.vmware.subscribed_content_library module – Manage a subscribed content library.
Note
This module is part of the vmware.vmware collection (version 2.0.0).
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 vmware.vmware
.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: vmware.vmware.subscribed_content_library
.
Synopsis
Create, update, or destroy a subscribed content library.
Requirements
The below requirements are needed on the host that executes this module.
vSphere Automation SDK
Parameters
Parameter |
Comments |
---|---|
If true and If false, other properties are still checked for differences. If a difference is found, the value of If This option is needed because there is no way to check the current password value and compare it against the desired password value. Choices:
|
|
The method of authentication to use if this is a subscribed or published local library. If the library is a local, non-published library, this option has no effect. The only options are NONE for no authentication or BASIC for username and password authentication. The username for BASIC auth cannot be changed, and is vcsp. Choices:
|
|
The password to use when If BASIC auth is not enabled, this option is ignored. |
|
The name of the datastore that should be a storage backing for the library. This parameter is required when This parameter only takes effect when the library is first created. You cannot change the storage backing for an existing library, and the module will not check this value in that case. |
|
The description for the content library. Default: |
|
The hostname or IP address of the vSphere vCenter server. If the value is not specified in the task, the value of environment variable |
|
The name of the subscribed content library to manage. |
|
The password of the vSphere vCenter server. If the value is not specified in the task, the value of environment variable |
|
The port number of the vSphere vCenter server. If the value is not specified in the task, the value of environment variable Default: |
|
The 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 |
|
The port of the HTTP proxy that will receive all HTTPS requests and relay them. If the value is not specified in the task, the value of environment variable |
|
The proxy connection protocol to use. This option is used if the correct proxy protocol cannot be automatically determined. Choices:
|
|
If specified, the thumbprint presented by the subscribed URL will be validated against this value. |
|
Whether the content library should be present or absent. Choices:
|
|
The URL of the remote library to which you want to subscribe. This parameter is required when configuring a subscribed library. |
|
Whether to download all content on demand, or download all content ahead of time. Choices:
|
|
The username of the vSphere vCenter server. If the value is not specified in the task, the value of environment variable |
|
Allows connection when SSL certificates are not valid. Set to If the value is not specified in the task, the value of environment variable Choices:
|
Notes
Note
All modules require API write access and hence are not supported on a free ESXi license.
All variables and VMware object names are case sensitive.
Modules may rely on the ‘requests’ python library, which does not use the system certificate store by default. You can specify the certificate store by setting the REQUESTS_CA_BUNDLE environment variable. Example: ‘export REQUESTS_CA_BUNDLE=/path/to/your/ca_bundle.pem’
Examples
- name: Create a subscribed content library with no authentication
vmware.vmware.subscribed_content_library:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
name: my-library
subscription_url: https://my-vcenter.com/whatever
- name: Create a library that uses a password for auth
vmware.vmware.subscribed_content_library:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
name: my-library
subscription_url: https://my-vcenter.com/whatever
authentication_method: BASIC
authentication_password: AVeryGoodPassword?
- name: Destroy subscribed library
vmware.vmware.subscribed_content_library:
validate_certs: false
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
name: my-library
state: absent
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
Identifying information about the library If the library was removed, only the name is returned Returned: On success Sample: |