summaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
authorMichael Gugino <mgugino@redhat.com>2017-11-09 15:15:47 -0500
committerMichael Gugino <mgugino@redhat.com>2017-11-09 15:15:47 -0500
commit8a1775c1b72d30452c910837b704f2d51f0aa559 (patch)
tree0f0f3426e8d9096163e8fd4fdbaaa1225546d5e8 /roles
parent7900f45d2d8ef566cf3f330a33364dd217a93c1d (diff)
downloadopenshift-8a1775c1b72d30452c910837b704f2d51f0aa559.tar.gz
openshift-8a1775c1b72d30452c910837b704f2d51f0aa559.tar.bz2
openshift-8a1775c1b72d30452c910837b704f2d51f0aa559.tar.xz
openshift-8a1775c1b72d30452c910837b704f2d51f0aa559.zip
Fix stale data in openshift_facts for logging
Currently, some stale facts may be present in '/etc/ansible/facts.d/openshift.fact' which causes openshift_facts to fail. This commit ensures that the data for the 'logging' key in that file is a dictionary; otherwise we re-initialize a new dictionary. Fixes: https://github.com/openshift/openshift-ansible/issues/6057
Diffstat (limited to 'roles')
-rwxr-xr-xroles/openshift_facts/library/openshift_facts.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/roles/openshift_facts/library/openshift_facts.py b/roles/openshift_facts/library/openshift_facts.py
index a88945538..7f393b564 100755
--- a/roles/openshift_facts/library/openshift_facts.py
+++ b/roles/openshift_facts/library/openshift_facts.py
@@ -490,7 +490,7 @@ def set_selectors(facts):
facts['hosted']['metrics'] = {}
if 'selector' not in facts['hosted']['metrics'] or facts['hosted']['metrics']['selector'] in [None, 'None']:
facts['hosted']['metrics']['selector'] = None
- if 'logging' not in facts:
+ if 'logging' not in facts or not isinstance(facts['logging'], dict):
facts['logging'] = {}
if 'selector' not in facts['logging'] or facts['logging']['selector'] in [None, 'None']:
facts['logging']['selector'] = None