community / community.vmware / 4.2.0 / module / vmware_vc_infraprofile_info List and Export VMware vCenter infra profile configs. Authors: Naveenkumar G P (@ngp)community.vmware.vmware_vc_infraprofile_info (4.2.0) — module
Install with ansible-galaxy collection install community.vmware:==4.2.0
collections: - name: community.vmware version: 4.2.0
Module to manage VMware vCenter infra profile configs.
vCenter infra profile Library feature is introduced in vSphere 7.0 version, so this module is not supported in the earlier versions of vSphere.
All variables and VMware object names are case sensitive.
- name: Get information about VC infraprofile vmware_vc_infraprofile_info: hostname: '{{ vcenter_hostname }}' username: '{{ vcenter_username }}' password: '{{ vcenter_password }}' delegate_to: localhost
- name: export vCenter appliance infra profile config vmware_vc_infraprofile_info: hostname: '{{ vcenter_hostname }}' username: '{{ vcenter_username }}' password: '{{ vcenter_password }}' api: "export" profiles: "ApplianceManagement" delegate_to: localhost
- name: validate vCenter appliance infra profile config vmware_vc_infraprofile_info: hostname: '{{ vcenter_hostname }}' username: '{{ vcenter_username }}' password: '{{ vcenter_password }}' api: "validate" profiles: "ApplianceManagement" config_path: "export.json"
- name: import vCenter appliance infra profile config vmware_vc_infraprofile_info: hostname: '{{ vcenter_hostname }}' username: '{{ vcenter_username }}' password: '{{ vcenter_password }}' api: "import" profiles: "ApplianceManagement" config_path: "import.json" delegate_to: localhost
api: choices: - export - import - list - validate description: - API which needs to be executed required: false type: str port: default: 443 description: - The port number of the vSphere vCenter. - If the value is not specified in the task, the value of environment variable E(VMWARE_PORT) will be used instead. type: int hostname: description: - The hostname or IP address of the vSphere vCenter server. - If the value is not specified in the task, the value of environment variable E(VMWARE_HOST) will be used instead. type: str password: aliases: - pass - pwd description: - The password of the vSphere vCenter server. - If the value is not specified in the task, the value of environment variable E(VMWARE_PASSWORD) will be used instead. type: str profiles: description: - A list of profile names to be exported, imported, and validated. - This parameter is not required while running for List API, not for V(export),V(import) and V(validate). required: false type: str protocol: choices: - http - https default: https description: - The connection to protocol. type: str username: aliases: - admin - user description: - The username of the vSphere vCenter server. - If the value is not specified in the task, the value of environment variable E(VMWARE_USER) will be used instead. type: str proxy_host: description: - 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 E(VMWARE_PROXY_HOST) will be used instead. required: false type: str proxy_port: description: - 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 E(VMWARE_PROXY_PORT) will be used instead. required: false type: int config_path: description: - Config file path which contains infra profile config JSON data, supports both relative and absolute path. - This parameter is required only when V(import),V(validate) APIs are being used. required: false type: str description: description: - Description of about encryption or decryption key. required: false type: str decryption_key: description: - decryption_key argument for while doing import profile task as of now its not taken into account form API team. required: false type: str encryption_key: description: - encryption_key argument for while doing import profile task as of now its not taken into account form API team. required: false type: str validate_certs: default: true description: - Allows connection when SSL certificates are not valid. - Set to V(false) when certificates are not trusted. - If the value is not specified in the task, the value of environment variable E(VMWARE_VALIDATE_CERTS) will be used instead. type: bool
export_infra: description: A message about the exported file returned: On success with API set as "export" sample: export_config_json: json exported to file type: dict import_profile: description: A message about import on import_profile spec returned: On success with API set as "import" sample: changed: true failed: false status: '0.0' type: dict list_infra: description: A list of infra configs, returned: on success with API as "list" sample: - info: ApplianceManagement name: ApplianceManagement - info: ApplianceNetwork name: ApplianceNetwork - info: Authentication & Authorization Management name: AuthManagement type: list validate_infra: description: A message about validate on exported file returned: On success with API set as "validate" sample: changed: false failed: false status: VALID type: dict