summaryrefslogtreecommitdiffstats
path: root/roles/dns-views
diff options
context:
space:
mode:
authorDavis Phillips <davis.phillips@gmail.com>2017-09-07 10:14:56 -0500
committerDavis Phillips <davis.phillips@gmail.com>2017-09-07 10:14:56 -0500
commit4ec2795d2978a602087d677799ddd8b9f941ee28 (patch)
treef23cb4c061741d85bd2b1a0bf0c77e04d7378c52 /roles/dns-views
parent90889d6be26eab6d6873d9063c3d8e2384ff9464 (diff)
parent1013e6ceefc83a182f231ab7d178676e4d996ceb (diff)
downloadopenshift-4ec2795d2978a602087d677799ddd8b9f941ee28.tar.gz
openshift-4ec2795d2978a602087d677799ddd8b9f941ee28.tar.bz2
openshift-4ec2795d2978a602087d677799ddd8b9f941ee28.tar.xz
openshift-4ec2795d2978a602087d677799ddd8b9f941ee28.zip
updating rhsm-sub and rhsm-repos
Diffstat (limited to 'roles/dns-views')
-rw-r--r--roles/dns-views/defaults/main.yml4
-rw-r--r--roles/dns-views/tasks/main.yml30
2 files changed, 34 insertions, 0 deletions
diff --git a/roles/dns-views/defaults/main.yml b/roles/dns-views/defaults/main.yml
new file mode 100644
index 000000000..c9f8248af
--- /dev/null
+++ b/roles/dns-views/defaults/main.yml
@@ -0,0 +1,4 @@
+---
+external_nsupdate_keys: {}
+named_private_recursion: 'yes'
+named_public_recursion: 'no'
diff --git a/roles/dns-views/tasks/main.yml b/roles/dns-views/tasks/main.yml
new file mode 100644
index 000000000..ffbad2e3f
--- /dev/null
+++ b/roles/dns-views/tasks/main.yml
@@ -0,0 +1,30 @@
+---
+- name: "Generate ACL list for DNS server"
+ set_fact:
+ acl_list: "{{ acl_list | default([]) + [ (hostvars[item]['private_v4'] + '/32') ] }}"
+ with_items: "{{ groups['cluster_hosts'] }}"
+
+- name: "Generate the private view"
+ set_fact:
+ private_named_view:
+ - name: "private"
+ recursion: "{{ named_private_recursion }}"
+ acl_entry: "{{ acl_list }}"
+ zone:
+ - dns_domain: "{{ full_dns_domain }}"
+ forwarder: "{{ public_dns_nameservers }}"
+ when: external_nsupdate_keys['private'] is undefined
+
+- name: "Generate the public view"
+ set_fact:
+ public_named_view:
+ - name: "public"
+ recursion: "{{ named_public_recursion }}"
+ zone:
+ - dns_domain: "{{ full_dns_domain }}"
+ forwarder: "{{ public_dns_nameservers }}"
+ when: external_nsupdate_keys['public'] is undefined
+
+- name: "Generate the final named_config_views"
+ set_fact:
+ named_config_views: "{{ private_named_view|default([]) + public_named_view|default([]) }}"