summaryrefslogtreecommitdiffstats
path: root/playbooks/openstack/openshift-cluster/dns.yml
diff options
context:
space:
mode:
authorThomas Wiest <twiest@users.noreply.github.com>2016-02-04 16:27:31 -0500
committerThomas Wiest <twiest@users.noreply.github.com>2016-02-04 16:27:31 -0500
commitb25ad7c7462c1ead726fa998e99b12a0c4da8676 (patch)
treeaba2da336673022ed2525bbbbd6952df334b79f8 /playbooks/openstack/openshift-cluster/dns.yml
parenta467f94a0157eaee88900dd466dd79dab2befa52 (diff)
parent82d474d7b1ba564f051c1ccf125413f4cca28d42 (diff)
downloadopenshift-b25ad7c7462c1ead726fa998e99b12a0c4da8676.tar.gz
openshift-b25ad7c7462c1ead726fa998e99b12a0c4da8676.tar.bz2
openshift-b25ad7c7462c1ead726fa998e99b12a0c4da8676.tar.xz
openshift-b25ad7c7462c1ead726fa998e99b12a0c4da8676.zip
Merge pull request #1206 from lhuard1A/openstack_dns
Add a DNS server on OpenStack clusters
Diffstat (limited to 'playbooks/openstack/openshift-cluster/dns.yml')
-rw-r--r--playbooks/openstack/openshift-cluster/dns.yml47
1 files changed, 47 insertions, 0 deletions
diff --git a/playbooks/openstack/openshift-cluster/dns.yml b/playbooks/openstack/openshift-cluster/dns.yml
new file mode 100644
index 000000000..5e7671a48
--- /dev/null
+++ b/playbooks/openstack/openshift-cluster/dns.yml
@@ -0,0 +1,47 @@
+- name: Populate oo_dns_hosts_to_update group
+ hosts: localhost
+ connection: local
+ become: no
+ gather_facts: no
+ vars_files:
+ - vars.yml
+ - cluster_hosts.yml
+ tasks:
+ - name: Evaluate oo_dns_hosts_to_update
+ add_host:
+ name: "{{ item }}"
+ groups: oo_dns_hosts_to_update
+ ansible_ssh_user: "{{ deployment_vars[deployment_type].ssh_user }}"
+ ansible_sudo: "{{ deployment_vars[deployment_type].sudo }}"
+ with_items: "{{ groups[cluster_id ~ '-dns'] }}"
+
+ - name: Evaluate oo_hosts_to_add_in_dns
+ add_host:
+ name: "{{ item }}"
+ groups: oo_hosts_to_add_in_dns
+ ansible_ssh_user: "{{ deployment_vars[deployment_type].ssh_user }}"
+ ansible_sudo: "{{ deployment_vars[deployment_type].sudo }}"
+ with_items: "{{ groups['tag_clusterid_' ~ cluster_id] }}"
+
+- name: Gather facts
+ hosts: oo_hosts_to_add_in_dns
+ vars_files:
+ - vars.yml
+ - cluster_hosts.yml
+
+- name: Configure the DNS
+ hosts: oo_dns_hosts_to_update
+ vars_files:
+ - vars.yml
+ - cluster_hosts.yml
+ roles:
+ - role: rhel_subscribe
+ when: deployment_type in ["enterprise", "atomic-enterprise", "openshift-enterprise"] and
+ ansible_distribution == "RedHat" and
+ lookup('oo_option', 'rhel_skip_subscription') | default(rhsub_skip, True) |
+ default('no', True) | lower in ['no', 'false']
+
+ - { role: dns,
+ dns_forwarders: "{{ openstack_network_dns }}",
+ dns_zones: [ novalocal, openstacklocal ],
+ dns_all_hosts: "{{ g_all_hosts }}" }