unwind: Initial version of role

This commit is contained in:
Timo Makinen 2025-01-06 20:27:55 +00:00
parent e02e45c8a6
commit 9696f406ce
3 changed files with 30 additions and 0 deletions

View file

@ -0,0 +1,5 @@
---
- name: Restart unwind
ansible.builtin.service:
name: unwind
state: restarted

View file

@ -0,0 +1,15 @@
---
- name: Copy config
ansible.builtin.template:
dest: /etc/unwind.conf
src: unwind.conf.j2
mode: "0644"
owner: root
group: "{{ ansible_wheel }}"
notify: Restart unwind
- name: Enable service
ansible.builtin.service:
name: unwind
state: started
enabled: true

View file

@ -0,0 +1,10 @@
{% if network_dns_servers is defined %}
forwarder {
{% for addr in network_dns_servers %}
{{ addr }} port 853 authentication name "{{ lookup('community.general.dig', addr + '/PTR')[:-1] }}" DoT
{% endfor %}
}
preference { DoT }
{% else %}
preference { oDoT-autoconf }
{% endif %}