win_dns_client – Configures DNS lookup on Windows hosts¶
Parameters¶
Notes¶
Note
- When setting an empty list of DNS server addresses on an adapter with DHCP enabled, a change will always be registered, since it is not possible to detect the difference between a DHCP-sourced server value and one that is statically set.
Examples¶
- name: Set a single address on the adapter named Ethernet
win_dns_client:
adapter_names: Ethernet
ipv4_addresses: 192.168.34.5
- name: Set multiple lookup addresses on all visible adapters (usually physical adapters that are in the Up state), with debug logging to a file
win_dns_client:
adapter_names: '*'
ipv4_addresses:
- 192.168.34.5
- 192.168.34.6
log_path: C:\dns_log.txt
- name: Configure all adapters whose names begin with Ethernet to use DHCP-assigned DNS values
win_dns_client:
adapter_names: 'Ethernet*'
ipv4_addresses: []
Status¶
- This module is not guaranteed to have a backwards compatible interface. [preview]
- This module is maintained by the Ansible Core Team. [core]
Red Hat Support¶
More information about Red Hat’s support of this module is available from this Red Hat Knowledge Base article.
Authors¶
- Matt Davis (@nitzmahone)
Hint
If you notice any issues in this documentation, you can edit this document to improve it.