mirror of
https://github.com/ansible/awx.git
synced 2026-05-14 04:47:44 -02:30
Fix warning from v2_playbook_on_task_start with ad hoc commands.
This commit is contained in:
@@ -160,10 +160,13 @@ class BaseCallbackModule(CallbackBase):
|
|||||||
# FIXME: Task is "global" unless using free strategy!
|
# FIXME: Task is "global" unless using free strategy!
|
||||||
task_ctx = dict(
|
task_ctx = dict(
|
||||||
task=(task.name or task.action),
|
task=(task.name or task.action),
|
||||||
task_path=task.get_path(),
|
|
||||||
task_uuid=str(task._uuid),
|
task_uuid=str(task._uuid),
|
||||||
task_action=task.action,
|
task_action=task.action,
|
||||||
)
|
)
|
||||||
|
try:
|
||||||
|
task_ctx['task_path'] = task.get_path()
|
||||||
|
except AttributeError:
|
||||||
|
pass
|
||||||
if not task.no_log:
|
if not task.no_log:
|
||||||
task_args = ', '.join(('%s=%s' % a for a in task.args.items()))
|
task_args = ', '.join(('%s=%s' % a for a in task.args.items()))
|
||||||
task_ctx['task_args'] = task_args
|
task_ctx['task_args'] = task_args
|
||||||
|
|||||||
Reference in New Issue
Block a user