I'm attempting to create a new plugin to direct playbook output (failures 
and causes) to my company's logging and messaging utilities.

The only thing missing at the moment is information about the machines the 
playbook is run against. I anticipate them being Amazon EC2 instances which 
return tags as ansible hostvars. However, I cannot seem to find any way to 
access hostvars from the plugin. I'm currently using the "on_any" function 
to capture as much information as possible, but the hostvars for the 
involved hosts don't seem to be included.

I could setup a debug task in the playbook to process the variables through 
the "runner_on_ok" function, but thought that it would be a better solution 
to keep all requirements internal to the plugin.

What is the best way to access hostvars in a plugin?

-- 
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/28331e98-0023-4f27-adf9-0b813d9da281%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to