From 9f0e771733655679f5115f30599a8c4cab511917 Mon Sep 17 00:00:00 2001 From: mg Date: Sun, 2 May 2021 14:03:16 +0200 Subject: [PATCH] =?UTF-8?q?PiHole:=20Anpassungen=20f=C3=BCr=20Homer=20(#77?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit task pihole für homer cors Co-authored-by: Michael Grote Reviewed-on: https://git.mgrote.net/mg/ansible/pulls/77 Co-Authored-By: mg Co-Committed-By: mg --- group_vars/pihole.yml | 2 ++ playbooks/service/pihole.yml | 8 +++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/group_vars/pihole.yml b/group_vars/pihole.yml index d2b950e9..45c506d2 100644 --- a/group_vars/pihole.yml +++ b/group_vars/pihole.yml @@ -19,3 +19,5 @@ - rule: allow to_port: 68 comment: 'pihole-dhcp' + ## playbook + pihole_homer_fqdn: docker.grote.lan # unter welchem host ist docker erreichbar? notwendig für die pihole stats in homer; fur die cors abfrage diff --git a/playbooks/service/pihole.yml b/playbooks/service/pihole.yml index 4a165f16..811824ba 100644 --- a/playbooks/service/pihole.yml +++ b/playbooks/service/pihole.yml @@ -10,7 +10,13 @@ create: yes backrefs: false mode: 0664 - + - name: Setze DNS-Resolver fuer pihole-* + ansible.builtin.blockinfile: + path: /etc/lighttpd/external.conf + block: | + setenv.add-environment = ( + "VIRTUAL_HOST" => "{{ pihole_homer_fqdn }} + ) # Wenn die VM beim Start mit "systemd-networkd-wait-online." hängt # Deaktiviere DHCP in: # sudo nano /etc/netplan/01-netcfg.yaml