diff options
author | Emil Renner Berthing <esmil@labitat.dk> | 2017-11-19 01:19:10 +0100 |
---|---|---|
committer | Emil Renner Berthing <esmil@labitat.dk> | 2017-11-19 12:46:29 +0100 |
commit | 3b795796bd03488a385f3ad42b10b8c0d61282c1 (patch) | |
tree | 19381884de2c8320b20d3205f22b71c42c63dd1c /roles/space_server/tasks/unbound.yml | |
parent | 505f69ee1540581eef2465dc420525213d278473 (diff) | |
download | labitat-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/unbound.yml')
-rw-r--r-- | roles/space_server/tasks/unbound.yml | 36 |
1 files changed, 36 insertions, 0 deletions
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: |