summaryrefslogtreecommitdiff
path: root/roles/install_bind/tasks/main.yml
diff options
context:
space:
mode:
Diffstat (limited to 'roles/install_bind/tasks/main.yml')
-rw-r--r--roles/install_bind/tasks/main.yml24
1 files changed, 24 insertions, 0 deletions
diff --git a/roles/install_bind/tasks/main.yml b/roles/install_bind/tasks/main.yml
new file mode 100644
index 0000000..31a833c
--- /dev/null
+++ b/roles/install_bind/tasks/main.yml
@@ -0,0 +1,24 @@
+---
+- name: install bind
+ pacman:
+ name: bind
+ state: present
+
+- name: create named zone backup folder
+ file:
+ path: /var/named/bak
+ state: directory
+ owner: named
+ group: named
+
+- name: bind config
+ template:
+ src: named.conf.j2
+ dest: /etc/named.conf
+ register: named_conf
+
+- name: reload bind
+ when: named_conf.changed
+ systemd:
+ name: named.service
+ state: reloaded