I'm executing a playbook from a Flask web service. All output goes to
stdout console. I need it in my webapp so that I can send it back to the
browser. Best I can get on the server is the summary stats counter from the
pb object. (success,skipped,failed,etc)
How can I get the complete output like with ansible.Runner()?
stats = callbacks.AggregateStats()
playbook_cb = callbacks.PlaybookCallbacks(verbose=utils.VERBOSITY)
runner_cb =
callbacks.PlaybookRunnerCallbacks(stats,verbose=utils.VERBOSITY)
pb = ansible.playbook.PlayBook(
playbook = playbook
stats=stats,
inventory=targets,
callbacks=playbook_cb,
runner_callbacks=runner_cb
).run()
Thanks!
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/2eae5651-aa35-4f9a-9ada-5dd96106753f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.