mirror of
https://github.com/ansible/awx.git
synced 2026-05-07 17:37:37 -02:30
strip ansible_env from job event callback data
this often contains sensitive details, and the data is already filtered and stored on the job itself see: #5601
This commit is contained in:
committed by
Matthew Jones
parent
123756468d
commit
ed5a01c0cf
@@ -304,6 +304,12 @@ class BaseCallbackModule(CallbackBase):
|
|||||||
|
|
||||||
def v2_runner_on_ok(self, result):
|
def v2_runner_on_ok(self, result):
|
||||||
# FIXME: Display detailed results or not based on verbosity.
|
# FIXME: Display detailed results or not based on verbosity.
|
||||||
|
|
||||||
|
# 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':
|
||||||
|
result._result.get('ansible_facts', {}).pop('ansible_env', None)
|
||||||
|
|
||||||
event_data = dict(
|
event_data = dict(
|
||||||
host=result._host.get_name(),
|
host=result._host.get_name(),
|
||||||
remote_addr=result._host.address,
|
remote_addr=result._host.address,
|
||||||
|
|||||||
Reference in New Issue
Block a user