On 30/10/14 20:48, Michael DeHaan wrote: > inventory scoped variables have less priority than globally scoped things. > > This is expected, yes.
Thanks for confirming. This case didn't appear to be inventory scoped, as it wasn't taking information from host_vars or group_vars, but I see why it is logically the same. Even so, the precedence seems backward: less specific globals beat more specific inventory vars. Is there a reason for this or is it purely historical? If you can tell me I'll attempt a documentation patch. Assuming I'm not a weirdo and it is indeed a common case to want global defaults which can be over-ridden on specific hosts, then I don't see a way to do that at a playbook level rather than using role defaults or follownig the docs' recommendation that "Site wide defaults should be defined as a ‘group_vars/all’ setting". These both force me to move playbook specific information into a location where they lose context or may be swamped by unrelated definitions. Task includes and the set_fact module might be another option, but they set vars at "task time", which I believe is too late for the values to be seen in roles the playbook might include. Would playbook default vars be considered a reasonable feature request? N -- 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/5452B6B9.3020605%40letterboxes.org. For more options, visit https://groups.google.com/d/optout.
