New in version 2.3.
win_dns_client
module configures the DNS client on Windows network adapters.parameter | required | default | choices | comments |
---|---|---|---|---|
adapter_names | yes | Adapter name or list of adapter names for which to manage DNS settings ('*' is supported as a wildcard value). The adapter name used is the connection caption in the Network Control Panel or via Get-NetAdapter , eg Local Area Connection . | ||
ipv4_addresses | yes | Single or ordered list of DNS server IPv4 addresses to configure for lookup. An empty list will configure the adapter to use the DHCP-assigned values on connections where DHCP is enabled, or disable DNS lookup on statically-configured connections. |
# set a single address on the adapter named Ethernet - win_dns_client: adapter_names: Ethernet ipv4_addresses: 192.168.34.5 # 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 # configure all adapters whose names begin with Ethernet to use DHCP-assigned DNS values - win_dns_client: adapter_names: "Ethernet*" ipv4_addresses: []
Note
This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.
For more information about Red Hat’s this support of this module, please refer to this knowledge base article<https://access.redhat.com/articles/rhel-top-support-policies>
For help in developing on modules, should you be so inclined, please read Community Information & Contributing, Testing Ansible and Developing Modules.
© 2012–2017 Michael DeHaan
© 2017 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/win_dns_client_module.html