init unbound
This commit is contained in:
6
ansible/dns.yaml
Normal file
6
ansible/dns.yaml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
# file: dns.yaml
|
||||||
|
- hosts: dns
|
||||||
|
roles:
|
||||||
|
- common
|
||||||
|
- unbound
|
||||||
@@ -1,2 +1,5 @@
|
|||||||
[gitea]
|
[gitea]
|
||||||
git.jthan.io
|
git.jthan.io
|
||||||
|
|
||||||
|
[dns]
|
||||||
|
rpi0.home.jthan.io
|
||||||
|
|||||||
5
ansible/roles/unbound/handlers/main.yaml
Normal file
5
ansible/roles/unbound/handlers/main.yaml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
- name: Restart nginx
|
||||||
|
service:
|
||||||
|
name: unbound
|
||||||
|
state: restarted
|
||||||
|
|
||||||
28
ansible/roles/unbound/tasks/main.yaml
Normal file
28
ansible/roles/unbound/tasks/main.yaml
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
- name: Install unbound
|
||||||
|
package:
|
||||||
|
name: "unbound"
|
||||||
|
state: present
|
||||||
|
|
||||||
|
- name: Enable unbound service
|
||||||
|
service:
|
||||||
|
name: unbound
|
||||||
|
enabled: yes
|
||||||
|
state: started
|
||||||
|
|
||||||
|
- name: Permit traffic in default zone on port 53/udp
|
||||||
|
ansible.posix.firewalld:
|
||||||
|
port: 53/udp
|
||||||
|
source: 192.0.1.0/24
|
||||||
|
permanent: true
|
||||||
|
state: enabled
|
||||||
|
immediate: true
|
||||||
|
offline: true
|
||||||
|
|
||||||
|
- name: Permit traffic in default zone on port 53/tcp
|
||||||
|
ansible.posix.firewalld:
|
||||||
|
port: 53/tcp
|
||||||
|
source: 192.0.1.0/24
|
||||||
|
permanent: true
|
||||||
|
state: enabled
|
||||||
|
immediate: true
|
||||||
|
offline: true
|
||||||
@@ -2,3 +2,4 @@
|
|||||||
# file: site.yaml
|
# file: site.yaml
|
||||||
- import_playbook: webservers.yaml
|
- import_playbook: webservers.yaml
|
||||||
- import_playbook: gitea.yaml
|
- import_playbook: gitea.yaml
|
||||||
|
- import_playbook: dns.yaml
|
||||||
|
|||||||
Reference in New Issue
Block a user