community / community.vmware / 4.2.0 / module / vmware_vm_config_option Return supported guest ID list and VM recommended config option for specific guest OS Authors: Diane Wang (@Tomorrow9) <dianew@vmware.com>community.vmware.vmware_vm_config_option (4.2.0) — module
Install with ansible-galaxy collection install community.vmware:==4.2.0
collections: - name: community.vmware version: 4.2.0
This module is used for getting the hardware versions supported for creation, the guest ID list supported by ESXi host for the most recent virtual hardware supported or specified hardware version, the VM recommended config options for specified guest OS ID.
- name: Get supported guest ID list on given ESXi host for with default hardware version community.vmware.vmware_vm_config_option: hostname: "{{ vcenter_hostname }}" username: "{{ vcenter_username }}" password: "{{ vcenter_password }}" esxi_hostname: "{{ esxi_hostname }}" get_guest_os_ids: true delegate_to: localhost
- name: Get VM recommended config option for Windows 10 guest OS on given ESXi host community.vmware.vmware_vm_config_option: hostname: "{{ vcenter_hostname }}" username: "{{ vcenter_username }}" password: "{{ vcenter_password }}" esxi_hostname: "{{ esxi_hostname }}" get_config_options: true guest_id: "windows9_64Guest" delegate_to: localhost
port: default: 443 description: - The port number of the vSphere vCenter or ESXi server. - If the value is not specified in the task, the value of environment variable E(VMWARE_PORT) will be used instead. type: int guest_id: description: - The guest OS ID from the returned list when O(get_guest_os_ids=true), e.g., 'rhel8_64Guest'. - This parameter must be set when O(get_config_options=true). type: str hostname: description: - 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 E(VMWARE_HOST) will be used instead. type: str password: aliases: - pass - pwd description: - The password of the vSphere vCenter or ESXi server. - If the value is not specified in the task, the value of environment variable E(VMWARE_PASSWORD) will be used instead. type: str username: aliases: - admin - user description: - The username of the vSphere vCenter or ESXi server. - If the value is not specified in the task, the value of environment variable E(VMWARE_USER) will be used instead. type: str datacenter: default: ha-datacenter description: - The datacenter name used to get specified cluster or host. - This parameter is case sensitive. 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 cluster_name: description: - Name of the cluster. - If O(esxi_hostname) is not given, this parameter is required. type: str esxi_hostname: description: - ESXi hostname. - Obtain VM configure options on this ESXi host. - If O(cluster_name) is not given, this parameter is required. 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 get_guest_os_ids: default: false description: - Return the list of guest OS IDs supported on the specified entity. - If O(hardware_version) is set, will return the corresponding guest OS ID list supported, or will return the guest OS ID list for the default hardware version. type: bool hardware_version: description: - The hardware version from the returned list when O(get_hardware_versions=true), e.g., 'vmx-19'. type: str get_config_options: default: false description: - Return the dict of VM recommended config options for guest ID specified by O(guest_id) with hardware version specified by O(hardware_version) or the default hardware version. - When set to V(true), O(guest_id) must be set. type: bool get_hardware_versions: default: false description: - Return the list of VM hardware versions supported for creation and the default hardware version on the specified entity. type: bool
instance: description: metadata about the VM recommended configuration returned: always sample: None type: dict