vsphere_copy – Copy a file to a vCenter datastore
vsphere_copy – Copy a file to a vCenter datastore
New in version 2.0.
Synopsis
- Upload files to a vCenter datastore
Parameters
Parameter | Choices/Defaults | Comments |
---|---|---|
datacenter - / required |
The datacenter on the vCenter server that holds the datastore. | |
datastore - / required |
The datastore on the vCenter server to push files to. | |
host - / required |
The vCenter server on which the datastore is available.
| |
login - / required |
The login name to authenticate on the vCenter server.
| |
password - / required |
The password to authenticate on the vCenter server. | |
path - / required |
The file to push to the datastore on the vCenter server. | |
src - / required |
The file to push to vCenter | |
validate_certs boolean |
|
If |
Notes
Note
- This module ought to be run from a system that can access vCenter directly and has the file to transfer. It can be the normal remote target or you can change it either by using
transport: local
or usingdelegate_to
. - Tested on vSphere 5.5
Examples
- vsphere_copy:
host: '{{ vhost }}'
login: '{{ vuser }}'
password: '{{ vpass }}'
src: /some/local/file
datacenter: DC1 Someplace
datastore: datastore1
path: some/remote/file
delegate_to: localhost
- vsphere_copy:
host: '{{ vhost }}'
login: '{{ vuser }}'
password: '{{ vpass }}'
src: /other/local/file
datacenter: DC2 Someplace
datastore: datastore2
path: other/remote/file
delegate_to: other_system
Status
- This module is not guaranteed to have a backwards compatible interface. [preview]
- This module is maintained by the Ansible Community. [community]
Authors
- Dag Wieers (@dagwieers)
© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.7/modules/vsphere_copy_module.html