summaryrefslogtreecommitdiffstats
path: root/roles/openshift_health_checker/action_plugins
diff options
context:
space:
mode:
authorRodolfo Carvalho <rhcarvalho@gmail.com>2017-08-08 18:53:44 +0200
committerGitHub <noreply@github.com>2017-08-08 18:53:44 +0200
commit7121e065b54f9642e6f69ca768b57c3eec542bf7 (patch)
tree4f849a9a7625cf97ad886c4513606121a0b20497 /roles/openshift_health_checker/action_plugins
parent0569c5069dabeea9e2fe94cd097cb6f2b1540867 (diff)
parent06a6fb9642a2cc70b1ca65f403b853fe8ce9d4b2 (diff)
downloadopenshift-7121e065b54f9642e6f69ca768b57c3eec542bf7.tar.gz
openshift-7121e065b54f9642e6f69ca768b57c3eec542bf7.tar.bz2
openshift-7121e065b54f9642e6f69ca768b57c3eec542bf7.tar.xz
openshift-7121e065b54f9642e6f69ca768b57c3eec542bf7.zip
Merge pull request #4913 from sosiouxme/20170720-refactor-check-results
openshift_checks: refactor check results
Diffstat (limited to 'roles/openshift_health_checker/action_plugins')
-rw-r--r--roles/openshift_health_checker/action_plugins/openshift_health_check.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/roles/openshift_health_checker/action_plugins/openshift_health_check.py b/roles/openshift_health_checker/action_plugins/openshift_health_check.py
index 23da53940..05e53333d 100644
--- a/roles/openshift_health_checker/action_plugins/openshift_health_check.py
+++ b/roles/openshift_health_checker/action_plugins/openshift_health_check.py
@@ -68,13 +68,15 @@ class ActionModule(ActionBase):
msg=str(e),
)
+ if check.changed:
+ r["changed"] = True
check_results[check_name] = r
- if r.get("failed", False):
- result["failed"] = True
- result["msg"] = "One or more checks failed"
+ result["changed"] = any(r.get("changed") for r in check_results.values())
+ if any(r.get("failed") for r in check_results.values()):
+ result["failed"] = True
+ result["msg"] = "One or more checks failed"
- result["changed"] = any(r.get("changed", False) for r in check_results.values())
return result
def load_known_checks(self, tmp, task_vars):