summaryrefslogtreecommitdiffstats
path: root/roles/openshift_facts
diff options
context:
space:
mode:
authorAndrew Butcher <abutcher@redhat.com>2015-12-01 16:30:05 -0500
committerAndrew Butcher <abutcher@redhat.com>2015-12-03 12:40:49 -0500
commit192ccc8e6e6f465351828f32e9dc43b840897b67 (patch)
treec562abf558ec654b0c3c8ba4411bb8070f23dda1 /roles/openshift_facts
parent3780deb06c7d8f85bfb031fbce7778646cbf64ee (diff)
downloadopenshift-192ccc8e6e6f465351828f32e9dc43b840897b67.tar.gz
openshift-192ccc8e6e6f465351828f32e9dc43b840897b67.tar.bz2
openshift-192ccc8e6e6f465351828f32e9dc43b840897b67.tar.xz
openshift-192ccc8e6e6f465351828f32e9dc43b840897b67.zip
Refactor dns options and facts.
Diffstat (limited to 'roles/openshift_facts')
-rwxr-xr-xroles/openshift_facts/library/openshift_facts.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/roles/openshift_facts/library/openshift_facts.py b/roles/openshift_facts/library/openshift_facts.py
index b60e42c71..e937b742e 100755
--- a/roles/openshift_facts/library/openshift_facts.py
+++ b/roles/openshift_facts/library/openshift_facts.py
@@ -528,9 +528,9 @@ def set_aggregate_facts(facts):
internal_hostnames.add(facts['common']['hostname'])
internal_hostnames.add(facts['common']['ip'])
+ cluster_domain = facts['common']['dns_domain']
+
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']:
@@ -985,7 +985,7 @@ class OpenShiftFacts(object):
Raises:
OpenShiftFactsUnsupportedRoleError:
"""
- known_roles = ['common', 'master', 'node', 'master_sdn', 'node_sdn', 'dns', 'etcd']
+ known_roles = ['common', 'master', 'node', 'master_sdn', 'node_sdn', 'etcd']
def __init__(self, role, filename, local_facts, additive_facts_to_overwrite=False):
self.changed = False
@@ -1056,6 +1056,7 @@ class OpenShiftFacts(object):
public_hostname=hostname)
common['client_binary'] = 'oc' if os.path.isfile('/usr/bin/oc') else 'osc'
common['admin_binary'] = 'oadm' if os.path.isfile('/usr/bin/oadm') else 'osadm'
+ common['dns_domain'] = 'cluster.local'
defaults['common'] = common
if 'master' in roles:
@@ -1076,7 +1077,6 @@ class OpenShiftFacts(object):
node = dict(labels={}, annotations={}, portal_net='172.30.0.0/16',
iptables_sync_period='5s', set_node_ip=False)
defaults['node'] = node
-
return defaults
def guess_host_provider(self):