diff --git a/inventory b/inventory index 22b71aa5..9fb38ed8 100644 --- a/inventory +++ b/inventory @@ -14,7 +14,6 @@ all: fileserver-test.grote.lan: dns: hosts: - pi.hole: pihole2-test.grote.lan: pihole2.grote.lan: acng: @@ -75,7 +74,6 @@ all: wireguard-test.grote.lan: dokuwiki-test.grote.lan: fileserver-test.grote.lan: - pihole-test.grote.lan: acng-test.grote.lan: ansible-test.grote.lan: docker-test.grote.lan: diff --git a/playbooks/service/dns.yml b/playbooks/service/dns.yml new file mode 100644 index 00000000..7dc1b67a --- /dev/null +++ b/playbooks/service/dns.yml @@ -0,0 +1,26 @@ +--- + - hosts: dns + become: yes + + tasks: + - name: Setze DNS-Resolver fuer pihole-* + ansible.builtin.lineinfile: + path: /etc/resolv.conf.head + line: nameserver 192.168.2.3 + create: yes + backrefs: false + mode: 0664 + +# Wenn die VM beim Start mit "systemd-networkd-wait-online." hängt +# Deaktiviere DHCP in: +# sudo nano /etc/netplan/01-netcfg.yaml +# network: +# version: 2 +# ethernets: +# ens18: +# addresses: +# - 192.168.2.3/24 +# dhcp4: no +# gateway4: 192.168.2.1 +# netplan apply +# sudo init 6