This module lets you manage ESXi servers on either all of your cluster members or individual hosts:
- name: Start the ntp service on all esxi hosts vmware_host_service_manager: hostname: "{{ vsphere_host }}" username: "{{ vsphere_username }}" password: "{{ vsphere_password }}" validate_certs: "no" cluster_name: "my_cluster" service_name: "ntpd" service_policy: "automatic" state: "present"
In this example, we are starting the NTP service (service_name) on all hosts within the cluster; as we have the service_policy defined as automatic, the service will only start if the services corresponding to the firewall rule have been configured. If we wanted the service to start regardless of the firewall rule, ...