From 3b795796bd03488a385f3ad42b10b8c0d61282c1 Mon Sep 17 00:00:00 2001 From: Emil Renner Berthing Date: Sun, 19 Nov 2017 01:19:10 +0100 Subject: space_server: unbound: use unbound instad of bind --- roles/space_server/tasks/unbound.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 roles/space_server/tasks/unbound.yml (limited to 'roles/space_server/tasks/unbound.yml') 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: -- cgit v1.2.1