Bugfix. PiHole (#3)

Doku

Housekeeping

Setze DNS-Resolver für Pihole

Co-authored-by: Michael Grote <michael.grote@posteo.de>
Reviewed-on: mg/ansible#3
Co-Authored-By: mg <mg@noreply.git.mgrote.net>
Co-Committed-By: mg <mg@noreply.git.mgrote.net>
This commit is contained in:
Michael Grote 2021-02-26 09:37:23 +01:00
parent 95ff7acd50
commit da4b10d92c
2 changed files with 26 additions and 2 deletions

View file

@ -14,7 +14,6 @@ all:
fileserver-test.grote.lan: fileserver-test.grote.lan:
dns: dns:
hosts: hosts:
pi.hole:
pihole2-test.grote.lan: pihole2-test.grote.lan:
pihole2.grote.lan: pihole2.grote.lan:
acng: acng:
@ -75,7 +74,6 @@ all:
wireguard-test.grote.lan: wireguard-test.grote.lan:
dokuwiki-test.grote.lan: dokuwiki-test.grote.lan:
fileserver-test.grote.lan: fileserver-test.grote.lan:
pihole-test.grote.lan:
acng-test.grote.lan: acng-test.grote.lan:
ansible-test.grote.lan: ansible-test.grote.lan:
docker-test.grote.lan: docker-test.grote.lan:

26
playbooks/service/dns.yml Normal file
View file

@ -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