summaryrefslogtreecommitdiffstats
path: root/roles/dns/tasks
diff options
context:
space:
mode:
authorLénaïc Huard <lhuard@amadeus.com>2016-01-18 16:28:55 +0100
committerLénaïc Huard <lhuard@amadeus.com>2016-02-04 18:20:03 +0100
commit82d474d7b1ba564f051c1ccf125413f4cca28d42 (patch)
tree0824401bf9beb36f4e137827177e988070b51981 /roles/dns/tasks
parent73ab565d036b6f3c8777d305fdc1a5029b097f88 (diff)
downloadopenshift-82d474d7b1ba564f051c1ccf125413f4cca28d42.tar.gz
openshift-82d474d7b1ba564f051c1ccf125413f4cca28d42.tar.bz2
openshift-82d474d7b1ba564f051c1ccf125413f4cca28d42.tar.xz
openshift-82d474d7b1ba564f051c1ccf125413f4cca28d42.zip
Add a DNS server on OpenStack clusters
Diffstat (limited to 'roles/dns/tasks')
-rw-r--r--roles/dns/tasks/main.yml22
1 files changed, 22 insertions, 0 deletions
diff --git a/roles/dns/tasks/main.yml b/roles/dns/tasks/main.yml
new file mode 100644
index 000000000..af728585d
--- /dev/null
+++ b/roles/dns/tasks/main.yml
@@ -0,0 +1,22 @@
+- name: Install Bind
+ action: "{{ ansible_pkg_mgr }} name=bind"
+
+- name: Configure Bind
+ template:
+ src: "{{ item.src }}"
+ dest: "{{ item.dest }}"
+ validate: "{{ item.validate }}"
+ with_items:
+ - src: openshift-cluster.zone
+ dest: /var/named/openshift-cluster.zone
+ validate: "named-checkzone {{ dns_zones[0] }} %s"
+ - src: named.conf
+ dest: /etc/named.conf
+ validate: "named-checkconf %s"
+ notify: restart bind
+
+- name: Enable Bind
+ service:
+ name: named
+ state: started
+ enabled: yes