Note
This plugin is part of the community.vmware collection (version 1.7.0).
To install it use: ansible-galaxy collection install community.vmware
.
To use it in a playbook, specify: community.vmware.vmware_content_deploy_ovf_template
.
The below requirements are needed on the host that executes this module.
Parameter | Choices/Defaults | Comments |
---|---|---|
cluster string | Name of the cluster in datacenter in which to place deployed VM. | |
content_library string added in 1.5.0 of community.vmware | The name of the content library from where the template resides. | |
datacenter string / required | Name of the datacenter, where VM to be deployed. | |
datastore string / required | Name of the datastore to store deployed VM and disk. | |
folder string / required | Name of the folder in datacenter in which to place deployed VM. | |
host string / required | 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. | |
hostname string | The hostname or IP address of the vSphere vCenter server. If the value is not specified in the task, the value of environment variable VMWARE_HOST will be used instead. | |
name string / required | The name of the VM to be deployed. aliases: vm_name | |
ovf_template string / required | The name of OVF template from which VM to be deployed. aliases: ovf, template_src | |
password string | The password of the vSphere vCenter server. If the value is not specified in the task, the value of environment variable VMWARE_PASSWORD will be used instead.aliases: pass, pwd | |
port integer | Default: 443 | 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. |
protocol string |
| The connection to protocol. |
resource_pool string / required | Name of the resourcepool in datacenter in which to place deployed VM. | |
storage_provisioning string |
| Default storage provisioning type to use for all sections of type vmw:StorageSection in the OVF descriptor. |
username string | The username of the vSphere vCenter server. If the value is not specified in the task, the value of environment variable VMWARE_USER will be used instead.aliases: admin, user | |
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. |
Note
- 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
Common return values are documented here, the following are the fields unique to this module:
Key | Returned | Description |
---|---|---|
vm_deploy_info dictionary | on success | Virtual machine deployment message and vm_id Sample: {'msg': "Deployed Virtual Machine 'Sample_VM'.", 'vm_id': 'vm-1009'} |
© 2012–2018 Michael DeHaan
© 2018–2021 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.11/collections/community/vmware/vmware_content_deploy_ovf_template_module.html