summaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
authorBogdan Dobrelya <bdobreli@redhat.com>2017-09-26 14:36:12 +0200
committerTomas Sedovic <tomas@sedovic.cz>2017-09-26 14:36:12 +0200
commit4669bf33d611555613dec904b1b33a1908f0a35b (patch)
tree29321760cea704f73fcf4296e66f05acbbecb274 /roles
parentd361dc4b307781ec2bb5978f30516f266a34188c (diff)
downloadopenshift-4669bf33d611555613dec904b1b33a1908f0a35b.tar.gz
openshift-4669bf33d611555613dec904b1b33a1908f0a35b.tar.bz2
openshift-4669bf33d611555613dec904b1b33a1908f0a35b.tar.xz
openshift-4669bf33d611555613dec904b1b33a1908f0a35b.zip
Fix public master cluster DNS record when using bastion (#752)
When using a bastion and a single master, add the bastion node's public IP the public master's IP for the DNS record. Signed-off-by: Bogdan Dobrelya <bdobreli@redhat.com>
Diffstat (limited to 'roles')
-rw-r--r--roles/dns-records/defaults/main.yml2
-rw-r--r--roles/dns-records/tasks/main.yml9
2 files changed, 11 insertions, 0 deletions
diff --git a/roles/dns-records/defaults/main.yml b/roles/dns-records/defaults/main.yml
new file mode 100644
index 000000000..3f7fa783f
--- /dev/null
+++ b/roles/dns-records/defaults/main.yml
@@ -0,0 +1,2 @@
+---
+use_bastion: False
diff --git a/roles/dns-records/tasks/main.yml b/roles/dns-records/tasks/main.yml
index 305a55195..7148b016a 100644
--- a/roles/dns-records/tasks/main.yml
+++ b/roles/dns-records/tasks/main.yml
@@ -70,6 +70,15 @@
when:
- hostvars[groups.masters[0]].openshift_master_cluster_public_hostname is defined
- openstack_num_masters == 1
+ - not use_bastion|bool
+
+- name: "Add public master cluster hostname records to the public A records (single master behind a bastion)"
+ 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.bastions[0]].public_v4 } ] }}"
+ when:
+ - hostvars[groups.masters[0]].openshift_master_cluster_public_hostname is defined
+ - openstack_num_masters == 1
+ - use_bastion|bool
- name: "Add public master cluster hostname records to the public A records (multi-master)"
set_fact: