The section about roles in the 'Ansible: Up and Running' book covers this 
topic quite well.
The recommendation in the book is to always prefix var names inside the 
role with the name of the role, which I believe is for the exact reason of 
avoiding the scenario that you ran into.



On Friday, June 17, 2016 at 6:53:11 AM UTC+10, Trond Hindenes wrote:
>
> I managed to at least get around the error:
> The trick is to use "internal" variables inside the role which never get 
> set outside the role. So if I have 2 "external" vars where the role wiill 
> set some 3rd variable depending on those two, the trick is to not re-use 
> the name of one of the two "external" ones. I've posted a working example 
> of this here:
>
>
> https://drive.google.com/file/d/0B81YECbGAyfWaW5rbVRQNlpQT2c/view?usp=sharing
>
> It's a little bit of extra work really having to watch out for this but at 
> least I got it working. I'd still consider it a bug tho.
>
>
>

-- 
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/5f50082c-6c13-4310-96fc-ddb45c6ebd16%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to