mirror of
https://github.com/linux-system-roles/network.git
synced 2026-01-23 02:15:17 +00:00
reason: The user wants to ignore automatically configured name servers and search domains (e.g. dns record from DHCP), and only use the name servers and search domains specified in the `dns` and `dns_search` properties. result: The user is able to ignore automatically configured name servers and search domains. Notice that there are two settings here distinguished by the address families, which aims to be compatible with NetworkManager (`ipv4.ignore-auto-dns` and `ipv6.ignore-auto-dns`)and Nmstate (setting `auto-dns` on `ipv4` or `ipv6` section). Also, the users can get auto DNS from DHCPv4, DHCPv6, modem etc, and they may want to ignore auto DNS on Ipv4 but not on IPv6, in this case, it is better to have two settings distinguished by the address families. Signed-off-by: Wen Liang <liangwen12year@gmail.com>
24 lines
817 B
YAML
24 lines
817 B
YAML
# SPDX-License-Identifier: BSD-3-Clause
|
|
---
|
|
- name: Test ipv4_ignore_auto_dns and ipv6_ignore_auto_dns settings
|
|
hosts: all
|
|
tasks:
|
|
- name: Test configuring ipv4_ignore_auto_dns and ipv6_ignore_auto_dns
|
|
settings for an interface
|
|
block:
|
|
- name: Configure an interface with ipv4_ignore_auto_dns disabled and
|
|
ipv6_ignore_auto_dns enabled
|
|
import_role:
|
|
name: linux-system-roles.network
|
|
vars:
|
|
network_connections:
|
|
- name: eth0
|
|
state: up
|
|
type: ethernet
|
|
autoconnect: false
|
|
ip:
|
|
ipv4_ignore_auto_dns: false
|
|
ipv6_ignore_auto_dns: true
|
|
auto6: true
|
|
address:
|
|
- 198.51.100.3/24
|