vmware.vmware_rest.appliance_infraprofile_configs module – Export, import, or validate infrastructure profile configurations on the vCenter Server Appliance.
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.appliance_infraprofile_configs.
New in vmware.vmware_rest 5.0.0
Synopsis
Export, import, or validate infrastructure profile (infraprofile) configurations on the vCenter Server Appliance.
Infrastructure profiles capture the configuration of appliance components (such as Authentication Management or Appliance Management) so they can be backed up and applied to other appliances.
Use
state=exportto retrieve the current configuration of one or more profiles as a JSON specification.Use
state=importto apply a previously exported configuration specification to the appliance.Use
state=validateto check whether a configuration specification can be applied without actually importing it.These are non-idempotent actions that are executed each time the module runs.
Parameters
Parameter |
Comments |
|---|---|
This property is deprecated as of __vSphere API 9.0.0.0__. The JSON string representing the desired config specification. This property was added in __vSphere API 7.0.0.0__. |
|
This property is deprecated as of __vSphere API 9.0.0.0__. Custom description provided by the user. This property was added in __vSphere API 7.0.0.0__. If missing or ‘null’ description will be empty. |
|
This property is deprecated as of __vSphere API 9.0.0.0__. Encryption Key to encrypt/decrypt profiles. This property was added in __vSphere API 7.0.0.0__. If missing or ‘null’ encryption will not be used for the profile. |
|
This property is deprecated as of __vSphere API 9.0.0.0__. The profile specification, if any This property was added in __vSphere API 7.0.0.0__. Only set if there is a profilespec avaliable for this import profilespec. |
|
This property is deprecated as of __vSphere API 9.0.0.0__. Custom description provided by the user. This property was added in __vSphere API 7.0.0.0__. If missing or ‘null’ description will be empty. |
|
This property is deprecated as of __vSphere API 9.0.0.0__. Encryption Key to encrypt/decrypt profiles. This property was added in __vSphere API 7.0.0.0__. If missing or ‘null’ encryption will not be used for the profile. |
|
This property is deprecated as of __vSphere API 9.0.0.0__. Profiles to be exported/imported. This property was added in __vSphere API 7.0.0.0__. If missing or ‘null’ or empty, all profiles will be returned. When clients pass a value of this schema as a parameter, the property must contain identifiers (MOIDs) for the resource type ‘com.vmware.infraprofile.profile’. When operations return a value of this schema as a response, the property will contain identifiers (MOIDs) for the resource type ‘com.vmware.infraprofile.profile’. |
|
This property is deprecated as of __vSphere API 9.0.0.0__. Profiles to be exported/imported. This property was added in __vSphere API 7.0.0.0__. If missing or ‘null’ or empty, all profiles will be returned. When clients pass a value of this schema as a parameter, the property must contain identifiers (MOIDs) for the resource type ‘com.vmware.infraprofile.profile’. When operations return a value of this schema as a response, the property will contain identifiers (MOIDs) for the resource type ‘com.vmware.infraprofile.profile’. |
|
Timeout in seconds for the whole operation including connection establishment, request sending, and response. Default: |
|
The desired state of the resource. Use Use Use Only options Choices:
|
|
The hostname or IP address of the vSphere vCenter. If the value is not specified in the task, the value of environment variable |
|
The vSphere vCenter password. If the value is not specified in the task, the value of environment variable |
|
The port number of the vSphere vCenter. If the value is not specified in the task, the value of environment variable |
|
Optional path to a log file for HTTP REST interaction. If the value is not specified in the task, the value of environment variable |
|
The vSphere vCenter username. 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
Generated from vSphere API spec 9.1.0.
Compatible with vSphere API 7.0.3.
Compatible with vSphere API 8.0.2.
Examples
- name: Export all infrastructure profiles
vmware.vmware_rest.appliance_infraprofile_configs:
state: export
register: exported_profiles
- name: Export a specific profile with a description
vmware.vmware_rest.appliance_infraprofile_configs:
state: export
profiles:
- ApplianceManagement
description: Backup taken before upgrade
register: appliance_mgmt_profile
- name: Validate a configuration specification before importing it
vmware.vmware_rest.appliance_infraprofile_configs:
state: validate
config_spec: "{{ exported_profiles.value }}"
- name: Import a previously exported configuration specification
vmware.vmware_rest.appliance_infraprofile_configs:
state: import
config_spec: "{{ exported_profiles.value }}"
profile_spec:
description: Restore appliance configuration
profiles:
- ApplianceManagement
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
|---|---|
Identifier of the infraprofile action performed. Returned: When state is set to a supported action Sample: |
|
The raw API response body from the vCenter operation. For For Returned: On success Sample: |