From e3417ec5af98cc0a2f991073e58e94883433d2f9 Mon Sep 17 00:00:00 2001 From: Kenjiro Nakayama Date: Sun, 7 Jan 2018 12:07:30 +0900 Subject: Add key existing check to collect facts for rolebidings --- roles/openshift_logging/library/openshift_logging_facts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'roles') diff --git a/roles/openshift_logging/library/openshift_logging_facts.py b/roles/openshift_logging/library/openshift_logging_facts.py index 302a9b4c9..f810ae39c 100644 --- a/roles/openshift_logging/library/openshift_logging_facts.py +++ b/roles/openshift_logging/library/openshift_logging_facts.py @@ -288,7 +288,7 @@ class OpenshiftLoggingFacts(OCBaseCommand): return for item in role["subjects"]: comp = self.comp(item["name"]) - if comp is not None and namespace == item["namespace"]: + if comp is not None and namespace == item.get("namespace"): self.add_facts_for(comp, "rolebindings", "logging-elasticsearch-view-role", dict()) # pylint: disable=no-self-use, too-many-return-statements -- cgit v1.2.3