From f6046d47c93d3f2d7043333018cee27d689aa0e5 Mon Sep 17 00:00:00 2001 From: Ryan Petrello Date: Mon, 1 May 2017 10:19:41 -0400 Subject: [PATCH] work around a change in ansible 2.3 to `Task.get_name()` Properly detect setup tasks so that we can filter out sensitive variables from the `ansible_facts` portion of the event payload. --- awx/lib/tower_display_callback/module.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/awx/lib/tower_display_callback/module.py b/awx/lib/tower_display_callback/module.py index 14e6fba66d..6f68b35046 100644 --- a/awx/lib/tower_display_callback/module.py +++ b/awx/lib/tower_display_callback/module.py @@ -301,7 +301,7 @@ class BaseCallbackModule(CallbackBase): # strip environment vars from the job event; it already exists on the # job and sensitive values are filtered there - if result._task.get_name() == 'setup': + if result._task.action in ('setup', 'gather_facts'): result._result.get('ansible_facts', {}).pop('ansible_env', None) event_data = dict(