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.

My plan is to a have a toggableable ability to write the logs to files on 
the system that ansible's running on (Current progress here: 
https://github.com/petems/ansible-json/tree/create_json_files).

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

-- 
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/8c6ff332-70b9-4c85-91e0-21bf42bde7cd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to