feat: added alpine support

This commit is contained in:
Simon Cornet 2025-10-24 21:58:35 +02:00
commit e475d2ce40
4 changed files with 25 additions and 4 deletions

View file

@ -1,9 +1,18 @@
--- ---
# unbound # unbound
- name: "restart unbound" - name: "restart unbound debian"
ansible.builtin.systemd: ansible.builtin.systemd:
name: "unbound.service" name: "unbound.service"
state: "restarted" state: "restarted"
daemon_reload: true daemon_reload: true
enabled: 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"

View file

@ -6,6 +6,7 @@ This role configures an Unbound DNS server.
| Operating System | Version | | Operating System | Version |
| --- | ----- | | --- | ----- |
| Alpine | 3.22 |
| Debian | 12 | | Debian | 12 |
## Tags ## Tags

View file

@ -1,6 +1,6 @@
--- ---
# configure unbound # confiure unbound
- name: "config - unbound" - name: "config - unbound"
ansible.builtin.template: ansible.builtin.template:
src: "templates/unbound/unbound.conf.j2" src: "templates/unbound/unbound.conf.j2"
@ -8,7 +8,9 @@
owner: "root" owner: "root"
group: "root" group: "root"
mode: "0644" mode: "0644"
notify: "restart unbound" notify:
- "restart unbound debian"
- "restart unbound alpine"
# configure unbound zones # configure unbound zones
- name: "config - unbound zones" - name: "config - unbound zones"
@ -18,4 +20,6 @@
owner: "root" owner: "root"
group: "root" group: "root"
mode: "0644" mode: "0644"
notify: "restart unbound" notify:
- "restart unbound debian"
- "restart unbound alpine"

View file

@ -6,3 +6,10 @@
name: "unbound" name: "unbound"
cache_valid_time: 120 cache_valid_time: 120
when: 'ansible_os_family == "Debian"' when: 'ansible_os_family == "Debian"'
# install unbound
- name: "install unbound"
community.general.apk:
name: "unbound"
update_cache: true
when: 'ansible_os_family == "Alpine"'