From 22166bc69bef0f0ba9eb5c8623ba6e178053a4dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yoha=C3=AF-Eliel=20BERREBY?= Date: Sat, 18 Apr 2020 16:23:57 +0200 Subject: [PATCH] unbound: log to journalctl --- group_vars/all/vars.yml | 2 +- hosts | 2 +- roles/unbound/tasks/main.yml | 1 - roles/unbound/templates/recursive.conf.j2 | 6 ++++-- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/group_vars/all/vars.yml b/group_vars/all/vars.yml index 0cb89fc..153e4f5 100644 --- a/group_vars/all/vars.yml +++ b/group_vars/all/vars.yml @@ -49,4 +49,4 @@ upstream_dns_servers: - "80.67.169.12" # French Data Network (FDN) (ns0.fdn.fr) - "1.1.1.1" # Cloudflare - +unbound_log_file: "/var/log/unbound.log" diff --git a/hosts b/hosts index e731c4c..0fc686d 100644 --- a/hosts +++ b/hosts @@ -150,7 +150,7 @@ gs_pve [dhcp] #dhcp-fleming.adm.auro.re -dhcp-fleming-backup.adm.auro.re +#dhcp-fleming-backup.adm.auro.re #dhcp-pacaterie.adm.auro.re #dhcp-pacaterie-backup.adm.auro.re #dhcp-edc.adm.auro.re diff --git a/roles/unbound/tasks/main.yml b/roles/unbound/tasks/main.yml index 6358173..4dfaa59 100644 --- a/roles/unbound/tasks/main.yml +++ b/roles/unbound/tasks/main.yml @@ -18,7 +18,6 @@ dest: /etc/unbound/unbound.conf.d/recursive.conf mode: 0644 - - name: restart unbound after editing config systemd: state: restarted diff --git a/roles/unbound/templates/recursive.conf.j2 b/roles/unbound/templates/recursive.conf.j2 index f5f7f69..ebfd445 100644 --- a/roles/unbound/templates/recursive.conf.j2 +++ b/roles/unbound/templates/recursive.conf.j2 @@ -4,11 +4,13 @@ server: # Timestamps use UTC ASCII instead of UNIX epoch. log-time-ascii: yes - logfile: /var/log/unbound.log - # Only log errors. verbosity: 0 + # "" sends logs to stderr, journalctl will pick things up. + logfile: "" + + do-ip4: yes # FIXME: IPv6 deployment... someday... do-ip6: no