I thought about using the set_fact in the previous task. It just seems more natural to set it in the same task, but that’s not possible.
Thanks, Jim > On Mar 5, 2015, at 5:57 PM, Dag Wieers <[email protected]> wrote: > > On Thu, 5 Mar 2015, Jim McMahon wrote: > >> Is there a way to set a variable just for a task? Say the task uses the >> template module and I want to set a variable just for that task that is not >> specific to the host I'm on. > > You can define a variable (conditionally) inside the template, or use > set_fact in the previous task, or include_vars in a previous task. > > It depends on what you would like to achieve, and why. > > -- > Dag -- 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/9694873F-BB41-4B22-8AA5-A69DBBBCED41%40flatworldknowledge.com. For more options, visit https://groups.google.com/d/optout.
