summaryrefslogtreecommitdiffstats
path: root/roles/openshift_facts/library
diff options
context:
space:
mode:
authorDevan Goodwin <dgoodwin@redhat.com>2016-05-20 15:14:28 -0300
committerDevan Goodwin <dgoodwin@redhat.com>2016-05-25 10:28:32 -0300
commitc45562e0e03e03c82bfcf60d4b3f8b7793133301 (patch)
tree5fe68e26ac01ebb58b30c0b116d213623f10a610 /roles/openshift_facts/library
parentdcb7289d9cf28b155aebb3b4ab820db2033c1b35 (diff)
downloadopenshift-c45562e0e03e03c82bfcf60d4b3f8b7793133301.tar.gz
openshift-c45562e0e03e03c82bfcf60d4b3f8b7793133301.tar.bz2
openshift-c45562e0e03e03c82bfcf60d4b3f8b7793133301.tar.xz
openshift-c45562e0e03e03c82bfcf60d4b3f8b7793133301.zip
Set openshift_version in config playbooks for first master.
Starting to remove openshift.docker.openshift_version fact usage. openshift_version should no longer contain a leading 'v' for containerized installs, just a version number.
Diffstat (limited to 'roles/openshift_facts/library')
-rwxr-xr-xroles/openshift_facts/library/openshift_facts.py12
1 files changed, 3 insertions, 9 deletions
diff --git a/roles/openshift_facts/library/openshift_facts.py b/roles/openshift_facts/library/openshift_facts.py
index b13343776..6127948bf 100755
--- a/roles/openshift_facts/library/openshift_facts.py
+++ b/roles/openshift_facts/library/openshift_facts.py
@@ -1133,15 +1133,9 @@ def get_openshift_version(facts):
if os.path.isfile('/usr/bin/openshift'):
_, output, _ = module.run_command(['/usr/bin/openshift', 'version'])
version = parse_openshift_version(output)
-
- # openshift_facts runs before openshift_docker_facts. However, it will be
- # called again and set properly throughout the playbook run. This could be
- # refactored to simply set the openshift.common.version in the
- # openshift_docker_facts role but it would take reworking some assumptions
- # on how get_openshift_version is called.
- if 'is_containerized' in facts['common'] and safe_get_bool(facts['common']['is_containerized']):
- if 'docker' in facts and 'openshift_version' in facts['docker']:
- version = facts['docker']['openshift_version']
+ elif os.path.isfile('/usr/local/bin/openshift'):
+ _, output, _ = module.run_command(['/usr/local/bin/openshift', 'version'])
+ version = parse_openshift_version(output)
return version