Loading handlers/main.yaml +10 −1 Original line number Diff line number Diff line --- # unbound - name: "restart unbound" - name: "restart unbound debian" ansible.builtin.systemd: name: "unbound.service" state: "restarted" daemon_reload: true enabled: true when: ansible_os_family == "Debian" listen: "restart unbound" - name: "restart unbound alpine" ansible.builtin.service: name: "unbound" state: "restarted" when: ansible_os_family == "Alpine" listen: "restart unbound" readme.md +1 −0 Original line number Diff line number Diff line Loading @@ -6,6 +6,7 @@ This role configures an Unbound DNS server. | Operating System | Version | | --- | ----- | | Alpine | 3.22 | | Debian | 12 | ## Tags Loading tasks/config.yaml +7 −3 Original line number Diff line number Diff line --- # configure unbound # confiure unbound - name: "config - unbound" ansible.builtin.template: src: "templates/unbound/unbound.conf.j2" Loading @@ -8,7 +8,9 @@ owner: "root" group: "root" mode: "0644" notify: "restart unbound" notify: - "restart unbound debian" - "restart unbound alpine" # configure unbound zones - name: "config - unbound zones" Loading @@ -18,4 +20,6 @@ owner: "root" group: "root" mode: "0644" notify: "restart unbound" notify: - "restart unbound debian" - "restart unbound alpine" tasks/install.yaml +7 −0 Original line number Diff line number Diff line Loading @@ -6,3 +6,10 @@ name: "unbound" cache_valid_time: 120 when: 'ansible_os_family == "Debian"' # install unbound - name: "install unbound" community.general.apk: name: "unbound" update_cache: true when: 'ansible_os_family == "Alpine"' Loading
handlers/main.yaml +10 −1 Original line number Diff line number Diff line --- # unbound - name: "restart unbound" - name: "restart unbound debian" ansible.builtin.systemd: name: "unbound.service" state: "restarted" daemon_reload: true enabled: true when: ansible_os_family == "Debian" listen: "restart unbound" - name: "restart unbound alpine" ansible.builtin.service: name: "unbound" state: "restarted" when: ansible_os_family == "Alpine" listen: "restart unbound"
readme.md +1 −0 Original line number Diff line number Diff line Loading @@ -6,6 +6,7 @@ This role configures an Unbound DNS server. | Operating System | Version | | --- | ----- | | Alpine | 3.22 | | Debian | 12 | ## Tags Loading
tasks/config.yaml +7 −3 Original line number Diff line number Diff line --- # configure unbound # confiure unbound - name: "config - unbound" ansible.builtin.template: src: "templates/unbound/unbound.conf.j2" Loading @@ -8,7 +8,9 @@ owner: "root" group: "root" mode: "0644" notify: "restart unbound" notify: - "restart unbound debian" - "restart unbound alpine" # configure unbound zones - name: "config - unbound zones" Loading @@ -18,4 +20,6 @@ owner: "root" group: "root" mode: "0644" notify: "restart unbound" notify: - "restart unbound debian" - "restart unbound alpine"
tasks/install.yaml +7 −0 Original line number Diff line number Diff line Loading @@ -6,3 +6,10 @@ name: "unbound" cache_valid_time: 120 when: 'ansible_os_family == "Debian"' # install unbound - name: "install unbound" community.general.apk: name: "unbound" update_cache: true when: 'ansible_os_family == "Alpine"'