Note
This module is part of the vmware.vmware collection (version 1.11.0).
You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.
To install it, use: ansible-galaxy collection install vmware.vmware.
To use it in a playbook, specify: vmware.vmware.import_content_library_ovf.
Parameter | Comments |
|---|---|
checksum string | The checksum that should be used to validate the upload.
This is not used if the source is an OVF. In that case he local file size is used to validate the upload. |
checksum_algorithm string | The checksum algorithm to use when validating uploads. This is required if This is not used if the source is an OVF. In that case he local file size is used to validate the upload. Choices:
|
description string | A description for the OVF item in the content library. |
dest aliases: name string / required | The destination name of the OVF item in the content library. If an item with the same name already exists, the module will not update it. |
fail_on_warnings boolean | Cause the module to treat any warnings thrown during the file upload process as errors. Choices:
|
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 |
library_id string | The ID of the library to search within. One of |
library_name string | The name of the library to search within. One of |
password aliases: pass, pwd string | The password of the vSphere vCenter server. If the value is not specified in the task, the value of environment variable |
port integer | The port number of the vSphere vCenter server. If the value is not specified in the task, the value of environment variable Default: |
proxy_host string | The 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 |
proxy_port integer | The 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 |
proxy_protocol aliases: protocol string | The proxy connection protocol to use. This option is used if the correct proxy protocol cannot be automatically determined. Choices:
|
src aliases: url, path path | The source OVF or OVA file that should be imported to the content library. This can be a local path or a URL. If it is a local path, it should be a valid path on the Ansible host. If it is a URL, its scheme can be HTTPS, HTTP, or datastore (ds://). The file is acquired directly from the vCenter appliance. The module will not encode URLs for you. If this is a URL with special characters (like $ or ~), you should use the urlencode filter. Required when state is present. |
ssl_thumbprint string | The SSL thumbprint of the source URL, if it uses HTTPS. This is ignored for other schemes. If this is not provided, whatever certificate is presented will be trusted. |
state string | Controls if the OVF file should be present or absent in the content library. Choices:
|
timeout integer | The timeout period in seconds for uploads to complete. Default: |
username aliases: admin, user string | The username of the vSphere vCenter server. If the value is not specified in the task, the value of environment variable |
validate_certs boolean | Allows connection when SSL certificates are not valid. Set to If the value is not specified in the task, the value of environment variable Choices:
|
Attribute | Support | Description |
|---|---|---|
check_mode | Support: full | The check_mode support. |
Note
See also
Deploy a virtual machine from an OVF in a content library.
- name: Acquire An OVA From A Url
vmware.vmware.import_content_library_ovf:
hostname: "https://vcenter"
username: "username"
password: "password"
src: "https://example.com/my/ova/file.ova"
dest: my_ova_file
library_name: MyContentLibrary
- name: Acquire An OVA From A Url With Special Chars
vmware.vmware.import_content_library_ovf:
hostname: "https://vcenter"
username: "username"
password: "password"
src: "{{ 'https://example.com/$my$/ova/file.ova' | urlencode }}"
dest: my_ova_file
library_name: MyContentLibrary
- name: Upload an OVF From The Ansible Host
vmware.vmware.import_content_library_ovf:
hostname: "https://vcenter"
username: "username"
password: "password"
library_id: "{{ my_library.id }}"
src: /opt/ovfs/my_ovf
dest: my_ovf_file
- name: Delete an OVF
vmware.vmware.import_content_library_ovf:
hostname: "https://vcenter"
username: "username"
password: "password"
state: absent
library_id: "{{ my_library.id }}"
dest: my_ovf_file
© 2012–2018 Michael DeHaan
© 2018–2025 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/collections/vmware/vmware/import_content_library_ovf_module.html