summaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
authortzumainn <tzumainn@redhat.com>2017-09-06 09:36:09 -0400
committerTomas Sedovic <tomas@sedovic.cz>2017-09-06 15:36:09 +0200
commit97c99ad8582370803e2841b07985260886614eb2 (patch)
treef23cb4c061741d85bd2b1a0bf0c77e04d7378c52 /roles
parent82a11c3352001e6c6066175ad200e0f9a1379973 (diff)
downloadopenshift-97c99ad8582370803e2841b07985260886614eb2.tar.gz
openshift-97c99ad8582370803e2841b07985260886614eb2.tar.bz2
openshift-97c99ad8582370803e2841b07985260886614eb2.tar.xz
openshift-97c99ad8582370803e2841b07985260886614eb2.zip
Point openshift_master_cluster_public_hostname at master or lb if defined (#706)
* Point openshift_master_cluster_public_hostname at master or load balancer if specified * cleanup * remove extraneous brackets * corrections * added doc section * add private records
Diffstat (limited to 'roles')
-rw-r--r--roles/dns-records/tasks/main.yml28
1 files changed, 28 insertions, 0 deletions
diff --git a/roles/dns-records/tasks/main.yml b/roles/dns-records/tasks/main.yml
index e9bce9718..305a55195 100644
--- a/roles/dns-records/tasks/main.yml
+++ b/roles/dns-records/tasks/main.yml
@@ -9,6 +9,20 @@
private_records: "{{ private_records | default([]) + [ { 'type': 'A', 'hostname': '*.' + openshift_app_domain, 'ip': hostvars[item]['private_v4'] } ] }}"
with_items: "{{ groups['infra_hosts'] }}"
+- name: "Add public master cluster hostname records to the private A records (single master)"
+ set_fact:
+ private_records: "{{ private_records | default([]) + [ { 'type': 'A', 'hostname': (hostvars[groups.masters[0]].openshift_master_cluster_public_hostname | replace(full_dns_domain, ''))[:-1], 'ip': hostvars[groups.masters[0]].private_v4 } ] }}"
+ when:
+ - hostvars[groups.masters[0]].openshift_master_cluster_public_hostname is defined
+ - openstack_num_masters == 1
+
+- name: "Add public master cluster hostname records to the private A records (multi-master)"
+ set_fact:
+ private_records: "{{ private_records | default([]) + [ { 'type': 'A', 'hostname': (hostvars[groups.masters[0]].openshift_master_cluster_public_hostname | replace(full_dns_domain, ''))[:-1], 'ip': hostvars[groups.lb[0]].private_v4 } ] }}"
+ when:
+ - hostvars[groups.masters[0]].openshift_master_cluster_public_hostname is defined
+ - openstack_num_masters > 1
+
- name: "Set the private DNS server to use the external value (if provided)"
set_fact:
nsupdate_server_private: "{{ external_nsupdate_keys['private']['server'] }}"
@@ -50,6 +64,20 @@
with_items: "{{ groups['infra_hosts'] }}"
when: hostvars[item]['public_v4'] is defined
+- name: "Add public master cluster hostname records to the public A records (single master)"
+ set_fact:
+ public_records: "{{ public_records | default([]) + [ { 'type': 'A', 'hostname': (hostvars[groups.masters[0]].openshift_master_cluster_public_hostname | replace(full_dns_domain, ''))[:-1], 'ip': hostvars[groups.masters[0]].public_v4 } ] }}"
+ when:
+ - hostvars[groups.masters[0]].openshift_master_cluster_public_hostname is defined
+ - openstack_num_masters == 1
+
+- name: "Add public master cluster hostname records to the public A records (multi-master)"
+ set_fact:
+ public_records: "{{ public_records | default([]) + [ { 'type': 'A', 'hostname': (hostvars[groups.masters[0]].openshift_master_cluster_public_hostname | replace(full_dns_domain, ''))[:-1], 'ip': hostvars[groups.lb[0]].public_v4 } ] }}"
+ when:
+ - hostvars[groups.masters[0]].openshift_master_cluster_public_hostname is defined
+ - openstack_num_masters > 1
+
- name: "Set the public DNS server details to use the external value (if provided)"
set_fact:
nsupdate_server_public: "{{ external_nsupdate_keys['public']['server'] }}"