diff options
author | Devan Goodwin <dgoodwin@redhat.com> | 2015-11-04 15:05:06 -0400 |
---|---|---|
committer | Devan Goodwin <dgoodwin@redhat.com> | 2015-11-04 15:05:06 -0400 |
commit | 153c57d6bda48276bc1f8be520145780fa119941 (patch) | |
tree | 7bcd0ddd715a688e9695bd65c642a89e1cda2687 /roles/openshift_facts | |
parent | 215a7aacc2fc3df19a64a2a57910516533665423 (diff) | |
parent | 896b9c63292a50dce8e7aa00a889dfd52a3a8474 (diff) | |
download | openshift-153c57d6bda48276bc1f8be520145780fa119941.tar.gz openshift-153c57d6bda48276bc1f8be520145780fa119941.tar.bz2 openshift-153c57d6bda48276bc1f8be520145780fa119941.tar.xz openshift-153c57d6bda48276bc1f8be520145780fa119941.zip |
Merge remote-tracking branch 'upstream/master' into upgrade
Diffstat (limited to 'roles/openshift_facts')
-rwxr-xr-x | roles/openshift_facts/library/openshift_facts.py | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/roles/openshift_facts/library/openshift_facts.py b/roles/openshift_facts/library/openshift_facts.py index 418c9c7aa..1b2ba6be3 100755 --- a/roles/openshift_facts/library/openshift_facts.py +++ b/roles/openshift_facts/library/openshift_facts.py @@ -484,12 +484,16 @@ def set_aggregate_facts(facts): dict: the facts dict updated with aggregated facts """ all_hostnames = set() + internal_hostnames = set() if 'common' in facts: all_hostnames.add(facts['common']['hostname']) all_hostnames.add(facts['common']['public_hostname']) all_hostnames.add(facts['common']['ip']) all_hostnames.add(facts['common']['public_ip']) + internal_hostnames.add(facts['common']['hostname']) + internal_hostnames.add(facts['common']['ip']) + if 'master' in facts: # FIXME: not sure why but facts['dns']['domain'] fails cluster_domain = 'cluster.local' @@ -497,11 +501,14 @@ def set_aggregate_facts(facts): all_hostnames.add(facts['master']['cluster_hostname']) if 'cluster_public_hostname' in facts['master']: all_hostnames.add(facts['master']['cluster_public_hostname']) - all_hostnames.update(['openshift', 'openshift.default', 'openshift.default.svc', - 'openshift.default.svc.' + cluster_domain, 'kubernetes', 'kubernetes.default', - 'kubernetes.default.svc', 'kubernetes.default.svc.' + cluster_domain]) + svc_names = ['openshift', 'openshift.default', 'openshift.default.svc', + 'openshift.default.svc.' + cluster_domain, 'kubernetes', 'kubernetes.default', + 'kubernetes.default.svc', 'kubernetes.default.svc.' + cluster_domain] + all_hostnames.update(svc_names) + internal_hostnames.update(svc_names) first_svc_ip = str(IPNetwork(facts['master']['portal_net'])[1]) all_hostnames.add(first_svc_ip) + internal_hostnames.add(first_svc_ip) if facts['master']['embedded_etcd']: facts['master']['etcd_data_dir'] = os.path.join( @@ -510,6 +517,7 @@ def set_aggregate_facts(facts): facts['master']['etcd_data_dir'] = '/var/lib/etcd' facts['common']['all_hostnames'] = list(all_hostnames) + facts['common']['internal_hostnames'] = list(all_hostnames) return facts |