From e4347eeb4fc49c397e6d388aa852b984079b3a6e Mon Sep 17 00:00:00 2001 From: "Philip (a-0)" <@ph:a-0.me> Date: Sun, 7 Aug 2022 13:31:59 +0200 Subject: [PATCH] moved local-ttl to dnsmasq.d --- handlers/main.yml | 1 - tasks/main.yml | 6 +++++- templates/dnsmasq.conf.j2 | 1 + templates/setupVars.conf.j2 | 3 +-- 4 files changed, 7 insertions(+), 4 deletions(-) delete mode 100644 handlers/main.yml create mode 100644 templates/dnsmasq.conf.j2 diff --git a/handlers/main.yml b/handlers/main.yml deleted file mode 100644 index ed97d53..0000000 --- a/handlers/main.yml +++ /dev/null @@ -1 +0,0 @@ ---- diff --git a/tasks/main.yml b/tasks/main.yml index 072a11a..cb4ba88 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -20,7 +20,6 @@ vars: __os_supported: "{{ lookup('vars', '{}_os_supported'.format(role_name)) | bool }}" - - name: Check whether pi-hole is installed stat: path: "{{ pihole_config_dir }}" @@ -50,6 +49,11 @@ warn: false when: not pihole_dir.stat.exists +- name: Set custom dnsmasq options + template: + src: dnsmasq.conf.j2 + dest: /etc/dnsmasq.d/10-custom.conf + - name: Set admin password shell: "pihole -a -p {{ pihole_admin_password }}" diff --git a/templates/dnsmasq.conf.j2 b/templates/dnsmasq.conf.j2 new file mode 100644 index 0000000..faf50b1 --- /dev/null +++ b/templates/dnsmasq.conf.j2 @@ -0,0 +1 @@ +local-ttl=3600 \ No newline at end of file diff --git a/templates/setupVars.conf.j2 b/templates/setupVars.conf.j2 index 13b81aa..fc98c07 100644 --- a/templates/setupVars.conf.j2 +++ b/templates/setupVars.conf.j2 @@ -15,5 +15,4 @@ PIHOLE_DNS_2={{ pihole_fallback_dns_server }} DNS_FQDN_REQUIRED=true DNS_BOGUS_PRIV=true DNSSEC=false -REV_SERVER=false -LOCAL_TTL=3600 \ No newline at end of file +REV_SERVER=false \ No newline at end of file