This repository has been archived on 2020-08-18. You can view files and clone it, but cannot push or open issues or pull requests.
ansible-dns/tasks/main.yml

42 lines
967 B
YAML
Raw Normal View History

2020-04-02 17:48:34 +00:00
- name: Copy configuration files
copy:
follow: yes
2020-04-09 16:31:42 +00:00
src: '{{ role_path }}/files/'
2020-04-02 17:48:34 +00:00
dest: /etc/unbound/
notify:
- Reload unbound
tags:
- update
- unbound
- name: Install Unbound
apt:
install_recommends: no
name: unbound
state: present
cache_valid_time: 3600
notify: Disable systemd-resolved
tags:
- setup
- packages
2020-04-14 20:51:57 +00:00
- name: Allow Unbound through iptables
loop:
2020-04-14 20:51:57 +00:00
- { ipv: 'ipv4', proto: 'tcp' }
- { ipv: 'ipv6', proto: 'tcp' }
- { ipv: 'ipv4', proto: 'udp' }
- { ipv: 'ipv6', proto: 'udp' }
iptables:
2020-04-14 20:51:57 +00:00
chain: INPUT
ctstate:
- NEW
- ESTABLISHED
- RELATED
destination_port: "53"
jump: ACCEPT
ip_version: '{{ item.ipv }}'
protocol: '{{ item.proto }}'
notify:
2020-04-14 20:51:57 +00:00
- Save netfilter rules
tags:
- update
- firewall