summaryrefslogtreecommitdiffstats
path: root/roles/openshift_facts
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2017-09-29 11:39:59 -0700
committerGitHub <noreply@github.com>2017-09-29 11:39:59 -0700
commit4c7d5c40c2820f83ad10eeb30b7b4cc07c0ef700 (patch)
treed557af48c1efff67b5f42bd2ea9b228e18fea267 /roles/openshift_facts
parent186ded59dc357f39d64cd27f915755b14c34d10f (diff)
parent95489f6f04dafb3051b44b420a22b4252bcdd4dd (diff)
downloadopenshift-4c7d5c40c2820f83ad10eeb30b7b4cc07c0ef700.tar.gz
openshift-4c7d5c40c2820f83ad10eeb30b7b4cc07c0ef700.tar.bz2
openshift-4c7d5c40c2820f83ad10eeb30b7b4cc07c0ef700.tar.xz
openshift-4c7d5c40c2820f83ad10eeb30b7b4cc07c0ef700.zip
Merge pull request #5577 from ashcrow/1496725
Automatic merge from submit-queue. openshift_facts: coerce docker_use_system_container to bool Use ``safe_get_bool()`` when reading ``docker_use_system_container`` to ensure that ansible accepted inputs are turned into real boolean results. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1496725 3.6 Backport: https://github.com/openshift/openshift-ansible/pull/5578
Diffstat (limited to 'roles/openshift_facts')
-rwxr-xr-xroles/openshift_facts/library/openshift_facts.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/roles/openshift_facts/library/openshift_facts.py b/roles/openshift_facts/library/openshift_facts.py
index 11ef9fa97..215ff4b72 100755
--- a/roles/openshift_facts/library/openshift_facts.py
+++ b/roles/openshift_facts/library/openshift_facts.py
@@ -1669,7 +1669,9 @@ def set_container_facts_if_unset(facts):
facts['common']['is_atomic'] = os.path.isfile('/run/ostree-booted')
# If openshift_docker_use_system_container is set and is True ....
if 'use_system_container' in list(facts['docker'].keys()):
- if facts['docker']['use_system_container']:
+ # use safe_get_bool as the inventory variable may not be a
+ # valid boolean on it's own.
+ if safe_get_bool(facts['docker']['use_system_container']):
# ... set the service name to container-engine
facts['docker']['service_name'] = 'container-engine'