summaryrefslogtreecommitdiffstats
path: root/roles/openshift_facts/library
diff options
context:
space:
mode:
authorMichael Gugino <mgugino@redhat.com>2017-11-27 15:39:46 -0500
committerMichael Gugino <mgugino@redhat.com>2017-12-07 14:37:36 -0500
commiteb6b20fc9183cc2aae424c72efd1191b99110a93 (patch)
treeae3dec3c4b4581471f3de0afd8a1711235242cc6 /roles/openshift_facts/library
parent37ffebc86cd4fe89373542285b40d92f61696270 (diff)
downloadopenshift-eb6b20fc9183cc2aae424c72efd1191b99110a93.tar.gz
openshift-eb6b20fc9183cc2aae424c72efd1191b99110a93.tar.bz2
openshift-eb6b20fc9183cc2aae424c72efd1191b99110a93.tar.xz
openshift-eb6b20fc9183cc2aae424c72efd1191b99110a93.zip
Remove openshift.common.service_type
This commit removes openshift.common.service_type in favor of openshift_service_type. This commit also removes r_openshift_excluder_service_type from plays in favor of using the role's defaults.
Diffstat (limited to 'roles/openshift_facts/library')
-rwxr-xr-xroles/openshift_facts/library/openshift_facts.py17
1 files changed, 7 insertions, 10 deletions
diff --git a/roles/openshift_facts/library/openshift_facts.py b/roles/openshift_facts/library/openshift_facts.py
index d2bd7357a..33c260bef 100755
--- a/roles/openshift_facts/library/openshift_facts.py
+++ b/roles/openshift_facts/library/openshift_facts.py
@@ -537,7 +537,7 @@ def set_aggregate_facts(facts):
def set_deployment_facts_if_unset(facts):
""" Set Facts that vary based on deployment_type. This currently
- includes common.service_type, master.registry_url, node.registry_url,
+ includes master.registry_url, node.registry_url,
node.storage_plugin_deps
Args:
@@ -549,14 +549,6 @@ def set_deployment_facts_if_unset(facts):
# disabled to avoid breaking up facts related to deployment type into
# multiple methods for now.
# pylint: disable=too-many-statements, too-many-branches
- if 'common' in facts:
- deployment_type = facts['common']['deployment_type']
- if 'service_type' not in facts['common']:
- service_type = 'atomic-openshift'
- if deployment_type == 'origin':
- service_type = 'origin'
- facts['common']['service_type'] = service_type
-
for role in ('master', 'node'):
if role in facts:
deployment_type = facts['common']['deployment_type']
@@ -1020,8 +1012,13 @@ def get_container_openshift_version(facts):
If containerized, see if we can determine the installed version via the
systemd environment files.
"""
+ deployment_type = facts['common']['deployment_type']
+ service_type_dict = {'origin': 'origin',
+ 'openshift-enterprise': 'atomic-openshift'}
+ service_type = service_type_dict[deployment_type]
+
for filename in ['/etc/sysconfig/%s-master-controllers', '/etc/sysconfig/%s-node']:
- env_path = filename % facts['common']['service_type']
+ env_path = filename % service_type
if not os.path.exists(env_path):
continue