summaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
Diffstat (limited to 'roles')
-rw-r--r--roles/openshift_common/defaults/main.yml4
-rw-r--r--roles/openshift_common/tasks/main.yml1
-rw-r--r--roles/openshift_master/tasks/main.yml5
3 files changed, 8 insertions, 2 deletions
diff --git a/roles/openshift_common/defaults/main.yml b/roles/openshift_common/defaults/main.yml
index 20b6f082c..cda966c96 100644
--- a/roles/openshift_common/defaults/main.yml
+++ b/roles/openshift_common/defaults/main.yml
@@ -1,3 +1,7 @@
---
openshift_bind_ip: "{{ ansible_default_ipv4.address }}"
openshift_debug_level: 0
+
+# TODO: Once openshift stops resolving hostnames for node queries remove
+# this...
+openshift_hostname_workaround: true
diff --git a/roles/openshift_common/tasks/main.yml b/roles/openshift_common/tasks/main.yml
index cfa0d8dfe..f72beb65b 100644
--- a/roles/openshift_common/tasks/main.yml
+++ b/roles/openshift_common/tasks/main.yml
@@ -2,6 +2,7 @@
# fixme: Once openshift stops resolving hostnames for node queries remove this...
- name: Set hostname to IP Addr (WORKAROUND)
hostname: name={{ openshift_bind_ip }}
+ when: openshift_hostname_workaround
- name: Configure local facts file
file: path=/etc/ansible/facts.d/ state=directory mode=0750
diff --git a/roles/openshift_master/tasks/main.yml b/roles/openshift_master/tasks/main.yml
index 0b3842856..1acc5b99b 100644
--- a/roles/openshift_master/tasks/main.yml
+++ b/roles/openshift_master/tasks/main.yml
@@ -16,8 +16,9 @@
lineinfile:
dest: /etc/sysconfig/openshift-master
regexp: '^OPTIONS='
- line: "OPTIONS=\"--public-master={{ openshift_public_ip }} --nodes={{ openshift_node_ips
- | join(',') }} --loglevel={{ openshift_master_debug_level }}\""
+ line: "OPTIONS=\"--public-master={{ openshift_public_ip if
+ openshift_hostname_workaround else ansible_fqdn }} --nodes={{ openshift_node_ips
+ | join(',') }} --loglevel={{ openshift_master_debug_level }}\""
notify:
- restart openshift-master