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()?
Ansible uses callback plugins for everything, so basically you’re going to need to write one.
I recommend Ansible Tower for easier API access for integrating with web applications - not only is the REST API very well designed for this, you avoid possible licensing issues if redistributing your app, can build your apps in any language (not just Python), don’t have to deal with resource scheduling (already there), and also don’t have to deal with a possibly changing callback internals.