diff --git a/roles/unbound/tasks/main.yml b/roles/unbound/tasks/main.yml index ff45ec1..3baed92 100644 --- a/roles/unbound/tasks/main.yml +++ b/roles/unbound/tasks/main.yml @@ -19,6 +19,15 @@ state: present register: unbound_install +- name: ensure unbound log directory exists + file: + path: /var/log/unbound + state: directory + mode: '0755' + owner: unbound + group: unbound + notify: restart unbound + - name: add unbound-control configuration template: src: unbound-control.conf.j2 @@ -33,13 +42,6 @@ mode: 0644 notify: restart unbound -- name: ensure unbound log directory exists - file: - path: /var/log/unbound - state: directory - mode: '0755' - owner: unbound - group: unbound - name: ask apparmor to allow unbound to write to log file template: