community.vmware.vmware_host_auto_start – Manage the auto power ON or OFF for vm on ESXi host¶
Note
This plugin is part of the community.vmware collection (version 1.9.0).
To install it use: ansible-galaxy collection install community.vmware
.
To use it in a playbook, specify: community.vmware.vmware_host_auto_start
.
Synopsis¶
In this module, can set up automatic startup and shutdown of virtual machines according to host startup or shutdown.
Requirements¶
The below requirements are needed on the host that executes this module.
python >= 2.7
PyVmomi
Parameters¶
Examples¶
---
- name: Update for system defaults config.
community.vmware.vmware_host_auto_start:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
esxi_hostname: "{{ esxi_hostname }}"
system_defaults:
enabled: true
start_delay: 100
stop_action: guestShutdown
- name: Update for powerInfo config of virtual machine.
community.vmware.vmware_host_auto_start:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
esxi_hostname: "{{ esxi_hostname }}"
name: "{{ vm_name }}"
power_info:
start_action: powerOn
start_delay: 10
start_order: 1
stop_action: powerOff
wait_for_heartbeat: true
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Authors¶
sky-joker (@sky-joker)