" I actually saw behavior that looks like a role was getting a value for a variable set in a LATER role"
I am occasionally incorrect. Vars do get compiled down first, tasks run in order, as variables do run in order, but I'd expect that. My apologies on not remembering correctly - I do think that's still fine due to the built-in protections around variable clobbering in roles (won't happen, etc). On Wed, Jul 2, 2014 at 6:48 PM, Marc Abramowitz <[email protected]> wrote: > On Wednesday, July 2, 2014 2:38:48 PM UTC-7, Michael DeHaan wrote: >> >> I mean Roles utilized after other roles. >> > > OK, thanks for clarifying. That's good to know, since I want to understand > clearly how things work before we get deep into this and start advocating > for company-wide usage. > > You might consider adding a note to the documentation about this (probably > the "Variables" page). I looked around quite a bit and couldn't find > anything that quite covered this "inter-role" behavior of variables. The > basic gist being "variables set in one role are available to roles that > execute sequentially afterwards". > > I think we now understand and we've worked around our issue with a > parameterized include, which we found to work by trial and error on our own. > > That said, you may or may not be interested to know that in the git repo > that I mentioned, I actually saw behavior that looks like a role was > getting a value for a variable set in a LATER role. Not a big deal to us as > we're using parameterized includes now, but I mention it just in case it's > interesting or surprising. > > -- > 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/df308498-2df8-49f1-84b6-45e66b1ff357%40googlegroups.com > <https://groups.google.com/d/msgid/ansible-project/df308498-2df8-49f1-84b6-45e66b1ff357%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- 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/CA%2BnsWgwc9N2ugQN8SHxAwQd5Pm6c5AR179is%3DH1rQxzfR4vLNQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
