Infra/ansible/roles/pihole/tasks/configure.yml
2021-08-17 00:05:31 +02:00

42 lines
1.1 KiB
YAML

- name: Set pihole webpassword
ansible.builtin.lineinfile:
path: /etc/pihole/setupVars.conf
regexp: "^WEBPASSWORD="
line: WEBPASSWORD={{ pihole.password | hash("sha256") | hash("sha256") | default("")}}
create: yes
- name: Set pihole theme
ansible.builtin.lineinfile:
path: /etc/pihole/setupVars.conf
regexp: "^WEBTHEME="
line: WEBTHEME=default-dark #default-dark default-darker default-light
create: yes
- name: Set pihole layout
ansible.builtin.lineinfile:
path: /etc/pihole/setupVars.conf
regexp: "^WEBUIBOXEDLAYOUT="
line: WEBUIBOXEDLAYOUT=boxed
create: yes
- name: Set pihole listen
ansible.builtin.lineinfile:
path: /etc/pihole/setupVars.conf
regexp: "^DNSMASQ_LISTENING="
line: DNSMASQ_LISTENING=local
create: yes
- name: Set pihole fqdn forwarding
ansible.builtin.lineinfile:
path: /etc/pihole/setupVars.conf
regexp: "^DNS_FQDN_REQUIRED="
line: DNS_FQDN_REQUIRED=true
create: yes
- name: Set pihole reverse lookup
ansible.builtin.lineinfile:
path: /etc/pihole/setupVars.conf
regexp: "^DNS_BOGUS_PRIV="
line: DNS_BOGUS_PRIV=true
create: yes