From bcf414e8b559d35909f26420d9e7dec3cd0a1897 Mon Sep 17 00:00:00 2001 From: Devan Goodwin Date: Thu, 9 Jun 2016 12:48:40 -0300 Subject: Fix missing openshift.common.version fact on containerized nodes. --- roles/openshift_facts/library/openshift_facts.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'roles') diff --git a/roles/openshift_facts/library/openshift_facts.py b/roles/openshift_facts/library/openshift_facts.py index 8824a663c..856dcbdb8 100755 --- a/roles/openshift_facts/library/openshift_facts.py +++ b/roles/openshift_facts/library/openshift_facts.py @@ -1138,6 +1138,9 @@ def get_openshift_version(facts): # and is falsely acting like openshift is already installed _, output, _ = module.run_command(['/usr/local/bin/openshift', 'version']) version = parse_openshift_version(output) + elif 'node' in facts and 'common' in facts and 'is_containerized' in facts['common']: + _, output, _ = module.run_command(['docker', 'run', '--rm', facts['common']['cli_image'], 'version']) + version = parse_openshift_version(output) return version -- cgit v1.2.3