The vmware_host_service_manager module

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, then we could set service_policy to on or if wanted to the service to be stopped, then service_policy should be set to off.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.219.14.63