I've added some new features to the API callbacks.
From a given callback instance, the following member variables *MAY*
be set at various points in time.
You should use getattr in case things are not yet set at the point you
use them, or if you are using the same callbacks for /usr/bin/ansible
and /usr/bin/ansible-playbook.
self.play # the current play object
self.playbook # the current playbook object
self.runner # the current runner object
self.task # the current task or handler object (set to None
while running the setup task)
This is needed for, among other things, writing some really good
callbacks for Ansible Commander logging, but I imagine anyone writing
custom callbacks
can make immediate use of this.
A getattr example for code inside a playbook would look like this:
play = getattr(self, 'play', None)
Let me know if there are any questions!
--Michael