Add support for Alpine Linux

This commit is contained in:
Sven Velt 2025-05-02 15:57:49 +02:00
parent f8ba8c1d29
commit cb3c4fd144
3 changed files with 30 additions and 0 deletions

View file

@ -2,3 +2,5 @@
unbound_cache_forwarder: unbound_cache_forwarder:
- 9.9.9.10 - 9.9.9.10
unbound_cache_listen: []

View file

@ -9,6 +9,23 @@
with_items: "{{ unbound_cache_packages }}" with_items: "{{ unbound_cache_packages }}"
- name: Add include to config file
lineinfile:
dest: /etc/unbound/unbound.conf
regexp: '^\s*#*\s*include:'
line: 'include: "/etc/unbound/unbound.conf.d/*.conf"'
backup: yes
- name: Create unbound.conf.d directory
file:
path: /etc/unbound/unbound.conf.d/
state: directory
owner: root
group: root
mode: 0755
- name: Template config files - name: Template config files
template: template:
src: "unbound.conf.d/{{ item }}.j2" src: "unbound.conf.d/{{ item }}.j2"
@ -21,3 +38,9 @@
notify: Restart unbound notify: Restart unbound
- name: Enable service
service:
name: unbound
enabled: yes

5
vars/alpine.yml Normal file
View file

@ -0,0 +1,5 @@
---
unbound_cache_packages:
- unbound
- ldns-tools