diff options
author | Devan Goodwin <dgoodwin@redhat.com> | 2015-11-03 14:37:27 -0400 |
---|---|---|
committer | Devan Goodwin <dgoodwin@redhat.com> | 2015-11-03 14:37:27 -0400 |
commit | 9d05b8c192a462c9d6a37586fc27cbd93f80ff65 (patch) | |
tree | 85696c092269859010348ede6fe80ba4c1124543 /roles/openshift_facts/library | |
parent | ab83e16dbed3eb5cf1dff96992509439d2739550 (diff) | |
parent | 3d3f2875bb89cdbdeadd7da4868355669ba12122 (diff) | |
download | openshift-9d05b8c192a462c9d6a37586fc27cbd93f80ff65.tar.gz openshift-9d05b8c192a462c9d6a37586fc27cbd93f80ff65.tar.bz2 openshift-9d05b8c192a462c9d6a37586fc27cbd93f80ff65.tar.xz openshift-9d05b8c192a462c9d6a37586fc27cbd93f80ff65.zip |
Merge remote-tracking branch 'upstream/master' into upgrade
Diffstat (limited to 'roles/openshift_facts/library')
-rwxr-xr-x | roles/openshift_facts/library/openshift_facts.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/roles/openshift_facts/library/openshift_facts.py b/roles/openshift_facts/library/openshift_facts.py index 8cd3aa2d4..418c9c7aa 100755 --- a/roles/openshift_facts/library/openshift_facts.py +++ b/roles/openshift_facts/library/openshift_facts.py @@ -22,6 +22,7 @@ import copy import os from distutils.util import strtobool from distutils.version import LooseVersion +from netaddr import IPNetwork def hostname_valid(hostname): @@ -486,12 +487,21 @@ def set_aggregate_facts(facts): 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']) if 'master' in facts: + # FIXME: not sure why but facts['dns']['domain'] fails + cluster_domain = 'cluster.local' if 'cluster_hostname' in facts['master']: 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]) + first_svc_ip = str(IPNetwork(facts['master']['portal_net'])[1]) + all_hostnames.add(first_svc_ip) if facts['master']['embedded_etcd']: facts['master']['etcd_data_dir'] = os.path.join( |