zaki_lknr / zaki_lknr.esxissh / 1.1.0 / module / esxissh_guest_power Manages power states of VM in ESXi with enable SSH Authors: zaki (@zaki-lknr)zaki_lknr.esxissh.esxissh_guest_power (1.1.0) — module
Install with ansible-galaxy collection install zaki_lknr.esxissh:==1.1.0
collections: - name: zaki_lknr.esxissh version: 1.1.0
Power on / off / shutdown (require vmware-tools) a virtual machine.
- name: Set the state of a VM to poweron esxissh_guest_power: esxiaddress: '{{ esxi_hostaddr }}' esxiusername: '{{ esxi_sshuser }}' esxipassword: '{{ esxi_sshpass }}' vmname: mv-virtual-machine state: poweron
- name: Set the state of a VM to shutdown (require vmware-tools) esxissh_guest_power: esxiaddress: '{{ esxi_hostaddr }}' esxiusername: '{{ esxi_sshuser }}' esxipassword: '{{ esxi_sshpass }}' vmname: mv-virtual-machine state: shutdown
- name: Set the state of a VM to poweroff esxissh_guest_power: esxiaddress: '{{ esxi_hostaddr }}' esxiusername: '{{ esxi_sshuser }}' esxipassword: '{{ esxi_sshpass }}' vmname: mv-virtual-machine state: poweroff
state: default: poweron description: - Set the state of the virtual machine. type: str vmname: description: - name of the virtual machine to work with. type: str esxiaddress: description: - The hostname or IP address of SSH on ESXi server type: str esxipassword: description: - The password of SSH on ESXi server type: str esxiusername: description: - The username of SSH on ESXi server type: str