I’ve been doing a bit of work with using Ansible as an API recently, and there are a few minor gaps.
For example I believe the on_ok and on_failed calls from _run_task could be passed the name of the task
The completion of a playbook has no associated callback.
It would also be nice to customize what Playbook.run() returns (perhaps a future on_complete could compile the results to return) - sure, stats.summarize might be what you want for some jobs, other times you might just want the concatenation of all the standard out, for example.
I guess my question for here is if I did some tidying in these areas such that ansible-playbook and ansible still work, and the tests all pass, would it be integrated at some point in future?
Will