It doesn't leak information in any way that is a problem, but rather the
variable is still in scope.

Variables from roles are available in other roles, but always guaranteed to
be used WITHIN that role.

Thus if you set in one role X, "a: 42"

and another role Y, "a: 44"

ansible is so written that role X always gets 42 and tasks in role Y always
get 44.

They won't clobber one another.

Having one role being able to define variables for another is however
important, for instance, a role might define presensce in a particular
datacenter and define a server address used in other roles.





On Tue, Jul 1, 2014 at 6:17 AM, John Anderson <[email protected]> wrote:

> I have the following structure:
>
> roles/pythonapp/
> roles/billingsvc/
> roles/usersvc/
>
>
> pythonapp is a generic set of instructions like cloning and installing a
> python package, billingsvc and usersvc both include it in their tasks.
>
> I have a variable that I set in billingsvc/vars/main.yml and I don't want
> usersvc to see this var but as soon as billingsvc finishes it runs usersvc
> and the var is there.
>
> Is there anyway to prevent this leaking of information?  I've defined the
> var in the role vars section specifically to keep it isolated from
> everything else.
>
> --
> 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/d96b6d38-e618-4c8a-b06a-5843a3cf36df%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/d96b6d38-e618-4c8a-b06a-5843a3cf36df%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%2BnsWgwiVSNby5o%3DoCnKHU76sv1PO9pM%2BMX6UtR9L%2B3WXgCB7A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to