Hi,

For callback plugin development questions, can you please post to
ansible-devel?

Thank you!




On Tue, Aug 12, 2014 at 10:46 AM, Peter M Souter <[email protected]> wrote:

> 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
> <https://groups.google.com/d/msgid/ansible-project/8c6ff332-70b9-4c85-91e0-21bf42bde7cd%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CA%2BnsWgxzK0W3Ttj8ORhO7ir73F30P5eJHwZcsRDNB_s6MfT6vg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to