I have a custom action plugin that launches a bunch of ec2 instances that 
receive custom user data. Within that data there is dynamic value that is 
unique per task but the same for all hosts inside that task. I can generate 
that value inside the action plugin for the first host, but can't figure 
out how to pass it to other hosts. I can save the value into a static 
variable, but then it would be the same for other tasks. I tried saving the 
value into inject and inject['hostvars'] but it gets lost between runs.

I came across this issue a few times before and it would be awesome if 
someone can explain how to properly handle global dynamic variables in 
plugins or else how? The general use case is generating configuration that 
is shared across all hosts in the task. Cheers.

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/16a48784-5cae-4168-84e2-dbed0e809736%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to