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 On Friday, August 26, 2016 at 4:25:34 PM UTC+5:30, Kai Stian Olstad wrote: > > On 26. aug. 2016 12:45, [email protected] <javascript:> wrote: > > This is not helpful to me as I only want json output and no thing in > > between, because in shell script I want to read this output and convert > the > > output to json object. > > Please let me know if I am not clear with my requirement. > > When I run with the json callback in 2.1.1 I only get json output in > return. Your output indicate you are not using json callback_plugin. > So how do you set up Ansible to use json callback? > > -- > 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/38c84a07-5626-46b5-a976-b6e3b8f6eeb7%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
