On 1/19/16 16:40, Bill Wiens wrote:
Did you ever find out how this works? I have a variable that's set in both
group_vars/aws/secrets.yml and group_vars/aws_dogfood/secrets.yml, and I
can't figure out why on some servers it uses the variable from "aws" and
others use the variable from "aws_dogfood".

-Bill

The short answer is 'no', sorry.

But you've brought this back to my mind and hopefully I'll have a chance to find out. If you do, I'd love to hear it.

I suspect the behaviour is actually 'undefined' because in python, dicts are not ordered, but I'm not sure. Perhaps we could convince Ansible that this matters and to replace the relevant dict with an collections.OrderedDict and insert key/value pairs in a specific (lexicographic?) order.

In Ansible 2.0+, it's probably somewhere in the VariableManager class (lib/ansible/vars/__init__.py)


--
Duncan Hutty
http://www.allgoodbits.org

--
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/569F9CDF.7040300%40allgoodbits.org.
For more options, visit https://groups.google.com/d/optout.

Reply via email to