vmware_deploy_ovf - Deploys a VMware virtual machine from an OVF or OVA file¶
New in version 2.7.
Parameters¶
Parameter | Choices/Defaults | Comments |
---|---|---|
allow_duplicates
bool |
|
Whether or not to allow duplicate VM names. ESXi allows duplicates, vCenter may not.
|
cluster |
Cluster to deploy to.
|
|
datacenter |
Default: ha-datacenter
|
Datacenter to deploy to.
|
datastore |
Default: datastore1
|
Datastore to deploy to.
|
deployment_option |
The key of the chosen deployment option.
|
|
disk_provisioning |
|
Disk provisioning type.
|
fail_on_spec_warnings
bool |
|
Cause the module to treat OVF Import Spec warnings as errors.
|
folder |
Absolute path of folder to place the virtual machine.
If not specified, defaults to the value of
datacenter.vmFolder . |
|
hostname
str |
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
VMWARE_HOST will be used instead.Environment variable supported added in version 2.6.
|
|
name |
Name of the VM to work with.
Virtual machine names in vCenter are not necessarily unique, which may be problematic.
|
|
networks |
Default: {u'VM Network': u'VM Network'}
|
key: value mapping of OVF network name, to the vCenter network name. |
ovf |
Path to OVF or OVA file to deploy.
aliases: ova |
|
password
str |
The password of the vSphere vCenter or ESXi server.
If the value is not specified in the task, the value of environment variable
VMWARE_PASSWORD will be used instead.Environment variable supported added in version 2.6.
aliases: pass, pwd |
|
port
int (added in 2.5) |
Default: 443
|
The port number of the vSphere vCenter or ESXi server.
If the value is not specified in the task, the value of environment variable
VMWARE_PORT will be used instead.Environment variable supported added in version 2.6.
|
power_on
bool |
|
Whether or not to power on the virtual machine after creation.
|
properties |
The assignment of values to the properties found in the OVF as key value pairs.
|
|
resource_pool |
Default: Resources
|
Resource Pool to deploy to.
|
username
str |
The username of the vSphere vCenter or ESXi server.
If the value is not specified in the task, the value of environment variable
VMWARE_USER will be used instead.Environment variable supported added in version 2.6.
aliases: admin, user |
|
validate_certs
bool |
|
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.Environment variable supported added in version 2.6.
If set to
yes , please make sure Python >= 2.7.9 is installed on the given machine. |
wait
bool |
|
Wait for the host to power on.
|
wait_for_ip_address
bool |
|
Wait until vCenter detects an IP address for the VM.
This requires vmware-tools (vmtoolsd) to properly work after creation.
|
Examples¶
- vmware_deploy_ovf:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
ovf: /path/to/ubuntu-16.04-amd64.ovf
wait_for_ip_address: true
delegate_to: localhost
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Key | Returned | Description |
---|---|---|
instance
dict
|
always |
metadata about the new virtual machine
Sample:
None
|
Status¶
This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.
Maintenance¶
This module is flagged as community which means that it is maintained by the Ansible Community. See Module Maintenance & Support for more info.
For a list of other modules that are also maintained by the Ansible Community, see here.
Author¶
- Matt Martz (@sivel)
Hint
If you notice any issues in this documentation you can edit this document to improve it.