summaryrefslogtreecommitdiffstats
path: root/roles/openshift_health_checker/action_plugins
diff options
context:
space:
mode:
authorLuke Meyer <lmeyer@redhat.com>2017-05-16 12:24:46 -0400
committerLuke Meyer <lmeyer@redhat.com>2017-05-23 14:39:48 -0400
commit1d5d13308bd79051b0bf3311240ef0e6cb286392 (patch)
tree474d5ea04967bf7d746d43f7f7bc6ac65bfe24dd /roles/openshift_health_checker/action_plugins
parent95df850e7df5b0afb2d7e759582ada6c6fab0df6 (diff)
downloadopenshift-1d5d13308bd79051b0bf3311240ef0e6cb286392.tar.gz
openshift-1d5d13308bd79051b0bf3311240ef0e6cb286392.tar.bz2
openshift-1d5d13308bd79051b0bf3311240ef0e6cb286392.tar.xz
openshift-1d5d13308bd79051b0bf3311240ef0e6cb286392.zip
health checks: configure failure output in playbooks
Customized the error summary to depend on the intent of the playbook run. Ensured output makes sense when failures are unrelated to running checks.
Diffstat (limited to 'roles/openshift_health_checker/action_plugins')
-rw-r--r--roles/openshift_health_checker/action_plugins/openshift_health_check.py6
1 files changed, 4 insertions, 2 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 e8a4c6474..a1df9cea3 100644
--- a/roles/openshift_health_checker/action_plugins/openshift_health_check.py
+++ b/roles/openshift_health_checker/action_plugins/openshift_health_check.py
@@ -25,9 +25,11 @@ class ActionModule(ActionBase):
def run(self, tmp=None, task_vars=None):
result = super(ActionModule, self).run(tmp, task_vars)
+ task_vars = task_vars or {}
- if task_vars is None:
- task_vars = {}
+ # vars are not supportably available in the callback plugin,
+ # so record any it will need in the result.
+ result['playbook_context'] = task_vars.get('r_openshift_health_checker_playbook_context')
if "openshift" not in task_vars:
result["failed"] = True