vmware.vmware_rest.content_configuration module – Manage the global configuration of the vCenter Content Library Service.

Note

This module is part of the vmware.vmware_rest collection (version 5.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_rest.

To use it in a playbook, specify: vmware.vmware_rest.content_configuration.

New in vmware.vmware_rest 5.0.0

Synopsis

  • Update the service-wide settings that control how the vCenter Content Library Service behaves.

  • These settings govern the automatic synchronization of subscribed libraries, the number of concurrent item and file transfers, and the bandwidth used when transferring content.

  • The configuration is a single, global object; there is only one instance per vCenter, so no identifier is required to select it.

  • Only the values you supply are changed. Some settings require a restart of the Content Library Service before they take effect, as noted on the individual options.

Parameters

Parameter

Comments

automatic_sync_enabled

boolean

Whether the Content Library Service automatically synchronizes subscribed libraries.

When enabled, all subscribed libraries are synchronized daily, and libraries that have their own automatic synchronization turned on are synchronized every hour between automatic_sync_start_hour and automatic_sync_stop_hour.

The default value is true.

Choices:

  • false

  • true

automatic_sync_enabled_setting

dictionary

Read-only metadata that describes the automatic_sync_enabled setting, such as whether a service restart is required and any constraints on its value.

This is returned by the get operation. It is accepted, but not required, on update.

This property was added in vSphere API 9.1.0.0.

constraints

list / elements=dictionary / required

The constraints that can apply to the value of the configuration. Each entry has ConstraintType and value.

This property was added in vSphere API 9.1.0.0.

name

string / required

The name of the configuration.

This property was added in vSphere API 9.1.0.0.

reboot_required

boolean / required

Flag indicates if reboot of the Content Library Service is required to apply the change after the configuration’s value is updated.

This property was added in vSphere API 9.1.0.0.

Choices:

  • false

  • true

automatic_sync_refresh_interval

integer

The interval in minutes between two consecutive automatic synchronizations of all subscribed content libraries within the automatic synchronization window defined by automatic_sync_start_hour and automatic_sync_stop_hour.

The default value is 240 minutes.

This property was added in vSphere API 9.1.0.0.

automatic_sync_refresh_interval_setting

dictionary

Read-only metadata that describes the automatic_sync_refresh_interval setting, such as whether a service restart is required and any constraints on its value.

This is returned by the get operation. It is accepted, but not required, on update.

This property was added in vSphere API 9.1.0.0.

constraints

list / elements=dictionary / required

The constraints that can apply to the value of the configuration. Each entry has ConstraintType and value.

This property was added in vSphere API 9.1.0.0.

name

string / required

The name of the configuration.

This property was added in vSphere API 9.1.0.0.

reboot_required

boolean / required

Flag indicates if reboot of the Content Library Service is required to apply the change after the configuration’s value is updated.

This property was added in vSphere API 9.1.0.0.

Choices:

  • false

  • true

automatic_sync_setting_refresh_interval

integer

The interval in seconds after some automatic synchronization settings are changed and before the Content Library Service applies the settings. The affected settings include automatic_sync_refresh_interval, automatic_sync_start_hour and automatic_sync_stop_hour.

The default value is 600 seconds. This setting requires restart of the content library service to take effect when changed.

This property was added in vSphere API 9.1.0.0.

automatic_sync_setting_refresh_interval_setting

dictionary

Read-only metadata that describes the automatic_sync_setting_refresh_interval setting, such as whether a service restart is required and any constraints on its value.

This is returned by the get operation. It is accepted, but not required, on update.

This property was added in vSphere API 9.1.0.0.

constraints

list / elements=dictionary / required

The constraints that can apply to the value of the configuration. Each entry has ConstraintType and value.

This property was added in vSphere API 9.1.0.0.

name

string / required

The name of the configuration.

This property was added in vSphere API 9.1.0.0.

reboot_required

boolean / required

Flag indicates if reboot of the Content Library Service is required to apply the change after the configuration’s value is updated.

This property was added in vSphere API 9.1.0.0.

Choices:

  • false

  • true

automatic_sync_start_hour

integer

The hour at which the automatic synchronization will start. This value is between 0 (midnight) and 23 inclusive.

The default value is 20.

automatic_sync_start_hour_setting

dictionary

Read-only metadata that describes the automatic_sync_start_hour setting, such as whether a service restart is required and any constraints on its value.

This is returned by the get operation. It is accepted, but not required, on update.

This property was added in vSphere API 9.1.0.0.

constraints

list / elements=dictionary / required

The constraints that can apply to the value of the configuration. Each entry has ConstraintType and value.

This property was added in vSphere API 9.1.0.0.

name

string / required

The name of the configuration.

This property was added in vSphere API 9.1.0.0.

reboot_required

boolean / required

Flag indicates if reboot of the Content Library Service is required to apply the change after the configuration’s value is updated.

This property was added in vSphere API 9.1.0.0.

Choices:

  • false

  • true

automatic_sync_stop_hour

integer

The hour at which the automatic synchronization will stop. Any active synchronization operation will continue to run, however no new synchronization operations will be triggered after the stop hour. This value is between 0 (midnight) and 23 inclusive.

The default value is 7.

automatic_sync_stop_hour_setting

dictionary

Read-only metadata that describes the automatic_sync_stop_hour setting, such as whether a service restart is required and any constraints on its value.

This is returned by the get operation. It is accepted, but not required, on update.

This property was added in vSphere API 9.1.0.0.

constraints

list / elements=dictionary / required

The constraints that can apply to the value of the configuration. Each entry has ConstraintType and value.

This property was added in vSphere API 9.1.0.0.

name

string / required

The name of the configuration.

This property was added in vSphere API 9.1.0.0.

reboot_required

boolean / required

Flag indicates if reboot of the Content Library Service is required to apply the change after the configuration’s value is updated.

This property was added in vSphere API 9.1.0.0.

Choices:

  • false

  • true

maximum_concurrent_item_syncs

integer

The maximum allowed number of library items to synchronize concurrently from remote libraries. This must be a positive number. The service may not be able to guarantee the requested concurrency if there is no available capacity.

This setting is global across all subscribed libraries. The default value is 5.

maximum_concurrent_item_syncs_setting

dictionary

Read-only metadata that describes the maximum_concurrent_item_syncs setting, such as whether a service restart is required and any constraints on its value.

This is returned by the get operation. It is accepted, but not required, on update.

This property was added in vSphere API 9.1.0.0.

constraints

list / elements=dictionary / required

The constraints that can apply to the value of the configuration. Each entry has ConstraintType and value.

This property was added in vSphere API 9.1.0.0.

name

string / required

The name of the configuration.

This property was added in vSphere API 9.1.0.0.

reboot_required

boolean / required

Flag indicates if reboot of the Content Library Service is required to apply the change after the configuration’s value is updated.

This property was added in vSphere API 9.1.0.0.

Choices:

  • false

  • true

priority_transfer_threads_pool_size

integer

Maximum number of concurrent transfers that is allowed to transfer priority files by the Content Library Service. Currently priority files include OVF descriptor file.

The default value is 5. This setting requires restart of the content library service to take effect when changed.

This property was added in vSphere API 9.1.0.0.

priority_transfer_threads_pool_size_setting

dictionary

Read-only metadata that describes the priority_transfer_threads_pool_size setting, such as whether a service restart is required and any constraints on its value.

This is returned by the get operation. It is accepted, but not required, on update.

This property was added in vSphere API 9.1.0.0.

constraints

list / elements=dictionary / required

The constraints that can apply to the value of the configuration. Each entry has ConstraintType and value.

This property was added in vSphere API 9.1.0.0.

name

string / required

The name of the configuration.

This property was added in vSphere API 9.1.0.0.

reboot_required

boolean / required

Flag indicates if reboot of the Content Library Service is required to apply the change after the configuration’s value is updated.

This property was added in vSphere API 9.1.0.0.

Choices:

  • false

  • true

session_timeout

float

Timeout in seconds for the whole operation including connection establishment, request sending, and response.

Default: 300.0

state

string

The desired state of the resource.

Use present to create or update the resource.

Choices:

  • "present" ← (default)

transfer_nfc_max_concurrent_transfers_per_host

integer

Maximum concurrent NFC transfers limit per ESXi host. This setting controls how many concurrent NFC sessions can be opened to a single ESXi host during transfers. Each file being transferred uses a single NFC connection.

This limit is shared across content library workflows requiring NFC transfers such as OVF template deployments, uploading or downloading an item, sync etc. The default value is 8.

This property was added in vSphere API 9.1.0.0.

transfer_nfc_max_concurrent_transfers_per_host_setting

dictionary

Read-only metadata that describes the transfer_nfc_max_concurrent_transfers_per_host setting, such as whether a service restart is required and any constraints on its value.

This is returned by the get operation. It is accepted, but not required, on update.

This property was added in vSphere API 9.1.0.0.

constraints

list / elements=dictionary / required

The constraints that can apply to the value of the configuration. Each entry has ConstraintType and value.

This property was added in vSphere API 9.1.0.0.

name

string / required

The name of the configuration.

This property was added in vSphere API 9.1.0.0.

reboot_required

boolean / required

Flag indicates if reboot of the Content Library Service is required to apply the change after the configuration’s value is updated.

This property was added in vSphere API 9.1.0.0.

Choices:

  • false

  • true

transfer_threads_pool_size

integer

Maximum number of concurrent transfers that is allowed to transfer non-priority files by the Content Library Service.

The default value is 20. This setting requires restart of the content library service to take effect when changed.

This property was added in vSphere API 9.1.0.0.

transfer_threads_pool_size_setting

dictionary

Read-only metadata that describes the transfer_threads_pool_size setting, such as whether a service restart is required and any constraints on its value.

This is returned by the get operation. It is accepted, but not required, on update.

This property was added in vSphere API 9.1.0.0.

constraints

list / elements=dictionary / required

The constraints that can apply to the value of the configuration. Each entry has ConstraintType and value.

This property was added in vSphere API 9.1.0.0.

name

string / required

The name of the configuration.

This property was added in vSphere API 9.1.0.0.

reboot_required

boolean / required

Flag indicates if reboot of the Content Library Service is required to apply the change after the configuration’s value is updated.

This property was added in vSphere API 9.1.0.0.

Choices:

  • false

  • true

transfer_throttling_bandwidth_total

integer

Maximum Bandwidth usage threshold in Mbps across all transfers handled by the Content Library Service.

The default value is 0 Mbit/s which means unlimited bandwidth.

This property was added in vSphere API 9.1.0.0.

transfer_throttling_bandwidth_total_setting

dictionary

Read-only metadata that describes the transfer_throttling_bandwidth_total setting, such as whether a service restart is required and any constraints on its value.

This is returned by the get operation. It is accepted, but not required, on update.

This property was added in vSphere API 9.1.0.0.

constraints

list / elements=dictionary / required

The constraints that can apply to the value of the configuration. Each entry has ConstraintType and value.

This property was added in vSphere API 9.1.0.0.

name

string / required

The name of the configuration.

This property was added in vSphere API 9.1.0.0.

reboot_required

boolean / required

Flag indicates if reboot of the Content Library Service is required to apply the change after the configuration’s value is updated.

This property was added in vSphere API 9.1.0.0.

Choices:

  • false

  • true

vcenter_hostname

string / required

The hostname or IP address of the vSphere vCenter.

If the value is not specified in the task, the value of environment variable VMWARE_HOST will be used instead.

vcenter_password

string / required

The vSphere vCenter password.

If the value is not specified in the task, the value of environment variable VMWARE_PASSWORD will be used instead.

vcenter_port

integer

The port number of the vSphere vCenter.

If the value is not specified in the task, the value of environment variable VMWARE_PORT will be used instead.

vcenter_rest_log_file

string

Optional path to a log file for HTTP REST interaction.

If the value is not specified in the task, the value of environment variable VMWARE_REST_LOG_FILE will be used instead.

vcenter_username

string / required

The vSphere vCenter username.

If the value is not specified in the task, the value of environment variable VMWARE_USER will be used instead.

vcenter_validate_certs

boolean

Allows connection when SSL certificates are not valid.

Set to false when certificates are not trusted.

If the value is not specified in the task, the value of environment variable VMWARE_VALIDATE_CERTS will be used instead.

Choices:

  • false

  • true ← (default)

Notes

Note

  • Generated from vSphere API spec 9.1.0.

  • Not compatible with vSphere API 7.0.3.

  • Not compatible with vSphere API 8.0.2.

Examples

- name: Enable automatic synchronization of subscribed libraries
  vmware.vmware_rest.content_configuration:
    automatic_sync_enabled: true

- name: Tune the automatic synchronization window and transfer limits
  vmware.vmware_rest.content_configuration:
    automatic_sync_enabled: true
    automatic_sync_start_hour: 22
    automatic_sync_stop_hour: 6
    maximum_concurrent_item_syncs: 10
    transfer_throttling_bandwidth_total: 500

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key

Description

value

any

The raw API response body from the vCenter operation.

Returned: On success

Sample: {}

Authors

  • Ansible Eco Content Team (@eco-ansible-content)