Übernahme aus privaten Projekt.
This commit is contained in:
16
roles/trixie_migration/tasks/config-dns.yml
Normal file
16
roles/trixie_migration/tasks/config-dns.yml
Normal file
@@ -0,0 +1,16 @@
|
||||
- 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"
|
||||
|
||||
Reference in New Issue
Block a user