unbound: Refactor variables

This commit is contained in:
Timo Makinen 2025-01-15 21:26:29 +00:00
parent ec4812a157
commit 8a9fd29c72
3 changed files with 6 additions and 7 deletions

View file

@ -12,7 +12,7 @@
ansible.builtin.command:
argv:
- unbound-control-setup
creates: "{{ unbound_control_key }}"
creates: "{{ unbound_confdir }}/unbound_control.key"
notify: Restart unbound
- name: Copy zone files
@ -28,7 +28,7 @@
- name: Copy config
ansible.builtin.template:
dest: "{{ unbound_conf }}"
dest: "{{ unbound_confdir }}/unbound.conf"
src: "unbound.conf.{{ inventory_hostname }}.j2"
mode: "0644"
owner: root

View file

@ -1,4 +1,4 @@
---
unbound_conf: /var/unbound/etc/unbound.conf
unbound_control_key: /var/unbound/etc/unbound_control.key
unbound_zonedir: /var/unbound/db
unbound_chroot: /var/unbound
unbound_confdir: "{{ unbound_chroot }}/etc"
unbound_zonedir: "{{ unbound_chroot }}/db"

View file

@ -1,4 +1,3 @@
---
unbound_conf: /etc/unbound/unbound.conf
unbound_control_key: /etc/unbound/unbound_control.key
unbound_confdir: /etc/unbound
unbound_zonedir: /var/lib/unbound