community / community.vmware / 4.2.0 / module / vmware_content_deploy_ovf_template Deploy Virtual Machine from ovf template stored in content library. Authors: Lev Goncharv (@ultral)community.vmware.vmware_content_deploy_ovf_template (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 deploy virtual machine from ovf template in content library.
All variables and VMware object names are case sensitive.
- name: Deploy Virtual Machine from OVF template in content library community.vmware.vmware_content_deploy_ovf_template: hostname: '{{ vcenter_hostname }}' username: '{{ vcenter_username }}' password: '{{ vcenter_password }}' ovf_template: rhel_test_template datastore: Shared_NFS_Volume folder: vm datacenter: Sample_DC_1 name: Sample_VM resource_pool: test_rp delegate_to: localhost
- name: Deploy Virtual Machine from OVF template in content library with eagerZeroedThick storage vmware_content_deploy_ovf_template: hostname: '{{ vcenter_hostname }}' username: '{{ vcenter_username }}' password: '{{ vcenter_password }}' ovf_template: rhel_test_template datastore: Shared_NFS_Volume folder: vm datacenter: Sample_DC_1 name: Sample_VM resource_pool: test_rp storage_provisioning: eagerZeroedThick delegate_to: localhost
host: description: - Name of the ESX Host in datacenter in which to place deployed VM. The host has to be a member of the cluster that contains the resource pool. required: false type: str name: aliases: - vm_name description: - The name of the VM to be deployed. required: true 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 folder: default: vm description: - Name of the folder in datacenter in which to place deployed VM. type: str cluster: description: - Name of the cluster in datacenter in which to place deployed VM. required: false type: str library: aliases: - content_library - content_library_src description: - The name of the content library from where the template resides. required: false type: str 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 protocol: choices: - http - https default: https description: - The connection to protocol. type: str template: aliases: - ovf - ovf_template - template_src description: - The name of OVF template from which VM to be deployed. required: true 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 datastore: description: - Name of the datastore to store deployed VM and disk. required: false type: str log_level: choices: - debug - info - normal default: normal description: - The level of logging desired in this module. required: false type: str datacenter: description: - Name of the datacenter, where VM to be deployed. required: true 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 resource_pool: description: - Name of the resourcepool in datacenter in which to place deployed VM. 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 datastore_cluster: description: - Name of the datastore cluster housing a datastore to store deployed VM and disk. - If datastore is not specified, the recommended datastore from this cluster will be used. required: false type: str storage_provisioning: choices: - thin - thick - eagerZeroedThick - eagerzeroedthick default: thin description: - Default storage provisioning type to use for all sections of type vmw:StorageSection in the OVF descriptor. type: str
vm_deploy_info: description: Virtual machine deployment message and vm_id returned: on success sample: msg: Deployed Virtual Machine 'Sample_VM'. vm_id: vm-1009 type: dict