Ok, so the problem I'm having in making this a callback is that I want to 
open a ticket on playbook start and close it on stats. 

In order to open the ticket, I need certain information that will be 
specific to the playbook being run. The only way I can find to pass vars is 
through play_vars, which are only available in v2_playbook_on_play_start 
through play.get_vars().
These vars are only those that are set in the play itself, which excludes 
vars defined in vars_files (play.get_vars_files() returns a list of files 
which I would then need to read).

I feel like I'm missing something. Is there a better way that I can pass 
variables to a callback_plugin?

The best I can find so far is to grab them from TaskResult['invocation'] 
*after* the first task is run (then keep track of the fact that I've 
already opened a ticket and not open a new one for every task).


-- 
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/583ce6cf-d400-418a-8977-f4b9aabe3917%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to