Variables are lazily evaluated and computed per host. The issues with
set_fact are that the evaluation is happening before setting the
variable as ansible evaluates the expression to pass it to the task:
so
vars:
varname: "{{expression}}" # this is lazy
- set_facts: varname={{expression}} #var is set to result of
'expression' as it is evaluated for the task.
I hope that clarifies the issue.
----------
Brian Coca
--
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/CACVha7dPyT4Nmn90BhZCg0bi6Q3gnLD1tsjCE%2BGbiC5SH2H0Ew%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.