community.vmware.vmware_host_dns – Manage DNS configuration of an ESXi host system¶
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_dns
.
Synopsis¶
This module can be used to configure DNS for the default TCP/IP stack on an ESXi host system.
Requirements¶
The below requirements are needed on the host that executes this module.
python >= 2.6
PyVmomi
Parameters¶
Examples¶
- name: Configure DNS for an ESXi host
community.vmware.vmware_host_dns:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
esxi_hostname: '{{ esxi_hostname }}'
type: static
host_name: esx01
domain: example.local
dns_servers:
- 192.168.1.10
- 192.168.1.11
search_domains:
- subdomain.example.local
- example.local
delegate_to: localhost
- name: Configure DNS for all ESXi hosts of a cluster
community.vmware.vmware_host_dns:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
cluster_name: '{{ cluster_name }}'
type: static
domain: example.local
dns_servers:
- 192.168.1.10
- 192.168.1.11
search_domains:
- subdomain.example.local
- example.local
delegate_to: localhost
- name: Configure DNS via DHCP for an ESXi host
community.vmware.vmware_host_dns:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
esxi_hostname: '{{ esxi_hostname }}'
type: dhcp
device: vmk0
delegate_to: localhost
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Authors¶
Christian Kotte (@ckotte)
Mario Lenz (@mariolenz)