c12s-kubespray/roles/kubernetes/preinstall/tasks/0063-networkmanager-dns.yml
Etienne Champetier e442b1d2b9
Add kube-ipvs0/nodelocaldns to NetworkManager unmanaged-devices (#7315)
On CentOS 8 they seem to be ignored by default, but better be extra safe
This also make it easy to exclude other network plugin interfaces

Signed-off-by: Etienne Champetier <e.champetier@ateme.com>
2021-03-03 07:27:20 -08:00

30 lines
1 KiB
YAML

---
- name: NetworkManager | Add nameservers to NM configuration
ini_file:
path: /etc/NetworkManager/conf.d/dns.conf
section: global-dns-domain-*
option: servers
value: "{{ ( coredns_server + nameservers|d([]) + cloud_resolver|d([])) | unique | join(',') }}"
mode: '0600'
backup: yes
notify: Preinstall | update resolvconf for Fedora CoreOS
- name: NetworkManager | Add DNS search to NM configuration
ini_file:
path: /etc/NetworkManager/conf.d/dns.conf
section: global-dns
option: searches
value: "{{ ([ 'default.svc.' + dns_domain, 'svc.' + dns_domain ] + searchdomains|default([])) | join(',') }}"
mode: '0600'
backup: yes
notify: Preinstall | update resolvconf for Fedora CoreOS
- name: NetworkManager | Add DNS options to NM configuration
ini_file:
path: /etc/NetworkManager/conf.d/dns.conf
section: global-dns
option: options
value: "ndots:{{ ndots }};timeout:2;attempts:2;"
mode: '0600'
backup: yes
notify: Preinstall | update resolvconf for Fedora CoreOS