vmware_host_service_manager – Manage services on a given ESXi host¶
New in version 2.5.
Synopsis¶
- This module can be used to manage (start, stop, restart) services on a given ESXi host.
- If cluster_name is provided, specified service will be managed on all ESXi host belonging to that cluster.
- If specific esxi_hostname is provided, then specified service will be managed on given ESXi host only.
Requirements¶
The below requirements are needed on the host that executes this module.
- python >= 2.6
- PyVmomi
Parameters¶
Examples¶
- name: Start ntpd service setting for all ESXi Host in given Cluster
vmware_host_service_manager:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
cluster_name: '{{ cluster_name }}'
service_name: ntpd
state: present
delegate_to: localhost
- name: Start ntpd setting for an ESXi Host
vmware_host_service_manager:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
esxi_hostname: '{{ esxi_hostname }}'
service_name: ntpd
state: present
delegate_to: localhost
- name: Start ntpd setting for an ESXi Host with Service policy
vmware_host_service_manager:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
esxi_hostname: '{{ esxi_hostname }}'
service_name: ntpd
service_policy: on
state: present
delegate_to: localhost
- name: Stop ntpd setting for an ESXi Host
vmware_host_service_manager:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
esxi_hostname: '{{ esxi_hostname }}'
service_name: ntpd
state: absent
delegate_to: localhost
Status¶
- This module is not guaranteed to have a backwards compatible interface. [preview]
- This module is maintained by the Ansible Community. [community]
Authors¶
- Abhijeet Kasurde (@Akasurde)
Hint
If you notice any issues in this documentation, you can edit this document to improve it.