17 lines
489 B
YAML
17 lines
489 B
YAML
- name: Setze DNS-Server auf Pi-hole für NetworkManager-Connection "preconfigured"
|
|
become: true
|
|
ansible.builtin.command:
|
|
cmd: >
|
|
nmcli connection modify "preconfigured"
|
|
ipv4.dns "{{ dns_ip }}"
|
|
ipv4.ignore-auto-dns yes
|
|
tags: dns
|
|
when: ansible_facts.lsb.codename == "trixie"
|
|
|
|
- name: Aktiviere geänderte DNS-Einstellungen
|
|
become: true
|
|
ansible.builtin.command: nmcli connection up "preconfigured"
|
|
tags: dns
|
|
when: ansible_facts.lsb.codename == "trixie"
|
|
|