aboutsummaryrefslogtreecommitdiffstats
path: root/roles/space_server/tasks
diff options
context:
space:
mode:
authorEmil Renner Berthing <esmil@labitat.dk>2017-11-19 01:19:10 +0100
committerEmil Renner Berthing <esmil@labitat.dk>2017-11-19 12:46:29 +0100
commit3b795796bd03488a385f3ad42b10b8c0d61282c1 (patch)
tree19381884de2c8320b20d3205f22b71c42c63dd1c /roles/space_server/tasks
parent505f69ee1540581eef2465dc420525213d278473 (diff)
downloadlabitat-ansible-3b795796bd03488a385f3ad42b10b8c0d61282c1.tar.gz
labitat-ansible-3b795796bd03488a385f3ad42b10b8c0d61282c1.tar.xz
labitat-ansible-3b795796bd03488a385f3ad42b10b8c0d61282c1.zip
space_server: unbound: use unbound instad of bind
Diffstat (limited to 'roles/space_server/tasks')
-rw-r--r--roles/space_server/tasks/main.yml4
-rw-r--r--roles/space_server/tasks/named.yml52
-rw-r--r--roles/space_server/tasks/unbound.yml36
3 files changed, 38 insertions, 54 deletions
diff --git a/roles/space_server/tasks/main.yml b/roles/space_server/tasks/main.yml
index 6893cbb..bd65b52 100644
--- a/roles/space_server/tasks/main.yml
+++ b/roles/space_server/tasks/main.yml
@@ -35,8 +35,8 @@
- import_tasks: radius.yml
tags: radius
when: radius_passwords is defined
-- import_tasks: named.yml
- tags: named
+- import_tasks: unbound.yml
+ tags: unbound
- import_tasks: avahi.yml
tags: avahi
diff --git a/roles/space_server/tasks/named.yml b/roles/space_server/tasks/named.yml
deleted file mode 100644
index d295058..0000000
--- a/roles/space_server/tasks/named.yml
+++ /dev/null
@@ -1,52 +0,0 @@
----
-- name: Install bind package
- dnf:
- name: bind
- state: latest
- notify:
- - restart named
- tags:
- - packages
-
-- name: Configure named
- copy:
- src: named/named.conf
- dest: '/etc/named.conf'
- mode: 0640
- notify:
- - restart named
-- name: Create s zone
- copy:
- src: named/s.zone
- dest: '/etc/named/s.zone'
- notify:
- - restart named
-
-- name: Create service drop-in directory
- file:
- dest: '/etc/systemd/system/named.service.d'
- state: directory
-- name: Start named after networks are configured
- copy:
- src: wait-online.conf
- dest: '/etc/systemd/system/named.service.d/wait-online.conf'
-
-- name: Enable named service
- systemd:
- name: named.service
- enabled: yes
- masked: no
- state: started
- when: "'container' not in ansible_env"
-- name: '- when in nspawn'
- command: systemctl enable named.service
- args:
- creates: '/etc/systemd/system/multi-user.target.wants/named.service'
- when: "'container' in ansible_env"
-
-- name: Use our own resolver
- copy:
- dest: /etc/resolv.conf
- content: "nameserver 127.0.0.1\nnameserver ::1\n"
-
-# vim: set ts=2 sw=2 et ft=yaml:
diff --git a/roles/space_server/tasks/unbound.yml b/roles/space_server/tasks/unbound.yml
new file mode 100644
index 0000000..42db916
--- /dev/null
+++ b/roles/space_server/tasks/unbound.yml
@@ -0,0 +1,36 @@
+---
+- name: Install unbound package
+ dnf:
+ name: unbound
+ state: latest
+ notify:
+ - restart unbound
+ tags:
+ - packages
+
+- name: Configure unbound
+ copy:
+ src: unbound/unbound.conf
+ dest: '/etc/unbound/unbound.conf'
+ notify:
+ - restart unbound
+
+- name: Enable unbound service
+ systemd:
+ name: unbound.service
+ enabled: yes
+ masked: no
+ state: started
+ when: "'container' not in ansible_env"
+- name: '- when in nspawn'
+ command: systemctl enable unbound.service
+ args:
+ creates: '/etc/systemd/system/multi-user.target.wants/unbound.service'
+ when: "'container' in ansible_env"
+
+- name: Use our own resolver
+ copy:
+ dest: /etc/resolv.conf
+ content: "nameserver 127.0.0.1\nnameserver ::1\n"
+
+# vim: set ts=2 sw=2 et ft=yaml: