Callbacks for generic Ansible runs?
<p>I have defined a callback like so:</p>

<pre><code>#!/usr/bin/env python2.7
# -*- coding: utf-8 -*-

import sys
import pprint

from ansible.plugins.callback import CallbackBase


class JSONPrettyPrintCallback(CallbackBase):

    printer = pprint.PrettyPrinter(indent=4, stream=sys.stdout)

    def log(self, host, category, data):
        # one json blob to rule them all
        self.printer.pprint({'host': host, 'category': category, 'data': data})
</code></pre>

<p>In my Ansible config, I have the path defined:</p>

<pre><code>[defaults]
callback_plugins = callback_plugins/
</code></pre>

<p>However, when i run my module, I still see the default Ansible output:</p>

<pre><code>10.0.0.1 | SUCCESS =&gt; {
    ...
}
</code></pre>

<p>I'm running it like this:</p>

<pre><code>ansible all -u myuser -m script -a 'path/to/script.py'
</code></pre>

<p>Is there something I need to do to format my output properly?</p>