wow it worked :) thanks Kai

However just one last question, I have multiple playbook but I want this 
json out only for one. So I cant have this config in ansible.cfg
Is there a way to pass this config other than editing this ansible.cfg file?

On Friday, August 26, 2016 at 5:23:34 PM UTC+5:30, Kai Stian Olstad wrote:
>
> On 26. aug. 2016 13:33, [email protected] <javascript:> wrote: 
> > I just added in my ansible.cfg file: 
> > stdout_callback = skippy 
> > callback_plugins   = 
> /home/ubuntu/projects/package/target/ansible/plugins/ 
> > callback 
> > 
> > Downloaded plugin from https://github.com/petems/ansible-json and added 
> it 
> > in the above folder. 
> > Now when I execute the playbook, I get the kind of output I mentioned 
> > earlier 
> > 
> > I also tried using plugin from 
> > 
> https://github.com/ansible/ansible/blob/devel/lib/ansible/plugins/callback/json.py
>  
> > 
> > But it gives me syntax error in "json.py" when I execute my playbook. I 
> > think it requires Python 3, I am having python 2.7.6 and I can't upgrade 
> to 
> > python 3 
> > 
> > I am using Ansible version 2.1.1.0 
>
> Ansible comes with the json callback plugins and some others you'll find 
> them in /usr/lib/python2.7/dist-packages/ansible/plugins/callback/ 
>
> To use the provided json callback set "stdout_callback = json" and 
> remove the "callback_plugins =" in your ansible.cfg. Then you should 
> only get a json output. 
>
> -- 
> Kai Stian Olstad 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/8d2e3259-6f82-4c9a-bac7-11a35c521c6d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to