Earlier today I announced that connection types were pluggable. Now
modules are too!
If you want to write code that does additional logging, stores ansible
results in a database, sends you email, or makes "pew pew" lasergun
noises as your playbooks are going off, this is the feature for you!
(I may seriously have to do that lasergun noise thing).
Look in lib/ansible/callbacks and read the source to "noop.py"
https://github.com/ansible/ansible/blob/devel/lib/ansible/callbacks/noop.py
noop means "no operation", and this is the most boring callback ever.
However, you can easily copy this class, drop it in another directory,
and add code to the methods contained within -- then ansible can
interface with whatever you want.
You don't have to define all the functions -- just the ones you use --
and the class should be named exactly the same (no subclassing), when
you drop it into the plugins directory.
I expect that over time there will be something like an
ansible-plugins repo, for storing things in differnet places, sending
notifications, and so on.
The list of callbacks we have now is not neccessarily all we're ever
going to have -- so if there is some kind of event you'd like to hook
up to, let me know, and we can probably make a callback for it.
I have tested this with all of the sample playbooks in the "examples/"
directory and haven't hit any problems, though there may be some
lurking -- testing is welcome.
Have fun and let me know if you develop anything interesting using
this, let me know!
--Michael