homeserver/playbooks/3_service/pihole.yml
mg 7a54f29995 Bugfix: hostnamen PiHole (#187)
Co-authored-by: Michael Grote <michael.grote@posteo.de>
Reviewed-on: mg/ansible#187
Co-authored-by: mg <mg@noreply.git.mgrote.net>
Co-committed-by: mg <mg@noreply.git.mgrote.net>
2021-08-16 14:03:10 +02:00

44 lines
1.1 KiB
YAML

---
- hosts: pihole
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
- name: Setze VIRTUAL_HOST für homer
ansible.builtin.blockinfile:
path: /etc/lighttpd/external.conf
block: |
setenv.add-environment = (
"VIRTUAL_HOST" => "{{ pihole_homer_fqdn }}"
)
state: absent
- name: deaktiviere rate limiting
ansible.builtin.blockinfile:
path: /etc/pihole/pihole-FTL.conf
block: |
RATE_LIMIT=0/0
MAXNETAGE=3
MAXDBDAYS=3
state: present
# 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