Hello All!
I've made a basic callback_plugin for creating logs as json, check it out:
https://github.com/petems/ansible-json
So far so good, it all works.
Two questions:
1) How do I read playbook variables in the plugin? My plan is to have something like this in the playbook:
---
- hosts: all
vars:
json_log: true
But I cant figure out how to get this information when the plugin runs.
2) Is there an example of a callback_plugin that reads a config value from the ansible.cfg? I want to be able to set where the ansible json logs are set to by a config setting, rather than hardcode it to /var/log/ansible/hosts/json.
Thanks!
Regards