This is my ansible playbook call
playbook_cb = callbacks.PlaybookCallbacks(verbose=utils.VERBOSITY)
stats = callbacks.AggregateStats()
runner_cb = callbacks.PlaybookRunnerCallbacks(stats, verbose=utils.VERBOSITY)
pb = PlayBook(
playbook=ANS_PLAYBOOK,
host_list=ANS_INVENTORY,
callbacks = playbook_cb,
runner_callbacks = runner_cb,
stats = runner_cb
)
results = pb.run()
return results
and the output that i currently get is
{'device': {'unreachable': 0, 'skipped': 7, 'ok': 9, 'changed': 8, 'failures': 0}}
That's fairly OK, but i want to get the task-specific stats so that if something fails I can see what and where.