win_net_adapter

win_net_adapter - Sets one or more interface specific DNS client configurations on a Windows host

Synopsis

  • This Ansible module allows to set one or more the interface specific DNS client configurations.
  • Uses the connection specific suffix as filter to select network card to update.

Parameters

Parameter Choices/Defaults Comments
suffix_filter
string / required
Specifies the DNS suffixes or the network profile names which will be used to filter the network adapter to configure.
new_name
string
Specifies the new name and interface alias of the network adapter.
The module adds index as '_I(index)' to the name when more netcard are using the same DNS suffixe.
For example, if new_name = OOB then netcard1 will be named OOB, netcard2 will be named OOB_1 and netcard3 will be name OOB_2.
register_ip_address
boolean
Choices:
  • no
  • yes
Indicates whether the IP address for this connection is to be registered.
Updates the option 'Register this connection's addresses in DNS' in DNS client tab properties.
reset_server_addresses
boolean
Choices:
  • no
  • yes
Resets the DNS server IP addresses to the default value.
server_addresses
string
Specifies a list of DNS server IP addresses to set for the interface.
tcpip6
boolean
Choices:
  • no
  • yes
Specifies to enable or to disable the IPv6 binding to the network adapter.

Examples

---
- name: Should renames a netcard
  win_net_adapter:
    suffix_filter: oob*
    new_Name: OOB

- name: Should disable the tcp ipv6 protocole
  win_net_adapter:
    suffix_filter: oob*
    tcpip6: false

- name: Should return the register_ip_address state
  win_net_adapter:
    suffix_filter: oob*
    register_ip_address: false

- name: Should reset the server addresses
  win_net_adapter:
    suffix_filter: consoto.com
    reset_server_addresses: true

- name: Should change the server addresses
  win_net_adapter:
    suffix_filter: consoto.com
    server_addresses: 8.8.8.8,8.8.8.4

- name: Should renames and configure multiple netcards
  win_net_adapter:
    suffix_filter: consoto.local,*.consoto.local
    new_name: OOB
    reset_server_addresses: true
    register_ip_address: false

- name: Should disable the tcp ipv6 protocole on all cards
  win_net_adapter:
    suffix_filter: '*'
    tcpip6: false

Authors

  • Stéphane Bilqué (@sbilque) Informatique CDC

License

This project is licensed under the Apache 2.0 License.

See LICENSE to see the full text.

About

Manipulate the configuration of one or more interface specific DNS client configurations

Install
ansible-galaxy install informatique-cdc/ansible-role-win_net_adapter
GitHub repository
License
apache-2.0
Downloads
16
Owner
Informatique CDC, subsidiary of Group Caisse des Dépôts is a key player in IT services and digital trust.