New in version 2.1.
parameter | required | default | choices | comments |
---|---|---|---|---|
cluster | no | None | The cluster hosting the VM Will help speed up search | |
datacenter | no | None | The datacenter hosting the VM Will help speed up search | |
folder (added in 2.4)
| no | /vm | Destination folder, absolute or relative path to find an existing guest or create the new guest. The folder should include the datacenter. ESX's datacenter is ha-datacenter Examples: folder: /ha-datacenter/vm folder: ha-datacenter/vm folder: /datacenter1/vm folder: datacenter1/vm folder: /datacenter1/vm/folder1 folder: datacenter1/vm/folder1 folder: /folder1/datacenter1/vm folder: folder1/datacenter1/vm folder: /folder1/datacenter1/vm/folder2 folder: vm/folder2 folder: folder2 | |
hostname | yes | The hostname or IP address of the vSphere vCenter. | ||
password | yes | The password of the vSphere vCenter. aliases: pass, pwd | ||
username | yes | The username of the vSphere vCenter. aliases: user, admin | ||
validate_certs | no | True |
| Allows connection when SSL certificates are not valid. Set to false when certificates are not trusted. |
vm_id | yes | The identification for the VM | ||
vm_id_type | no | vm_name |
| The identification tag for the VM |
vm_password | no | None | The password used to login to the VM. | |
vm_shell | yes | The absolute path to the program to start. On Linux this is executed via bash. | ||
vm_shell_args | no | None | The argument to the program. | |
vm_shell_cwd | no | None | The current working directory of the application from which it will be run | |
vm_shell_env | no | None | Comma separated list of envirnoment variable, specified in the guest OS notation | |
vm_username | no | None | The user to connect to the VM. |
- name: shell execution local_action: module: vmware_vm_shell hostname: myVSphere username: myUsername password: mySecret datacenter: myDatacenter folder: /vm vm_id: NameOfVM vm_username: root vm_password: superSecret vm_shell: /bin/echo vm_shell_args: " $var >> myFile " vm_shell_env: - "PATH=/bin" - "VAR=test" vm_shell_cwd: "/tmp"
Note
This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.
For help in developing on modules, should you be so inclined, please read Community Information & Contributing, Testing Ansible and Developing Modules.
© 2012–2017 Michael DeHaan
© 2017 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/vmware_vm_shell_module.html