JM> Re the role issue. I think the problem was around 1.6 group_vars/all JM> vs other group_vars/ precedence changed. We used to have all defaults JM> in group_vars/all.yml and override in the other groups. To try and fix JM> this and move away from having a dumping ground of variables we moved JM> them into relevant roles. The variables may be needed in other JM> playbooks or roles. I.e applications conf.d directory. So to get the JM> variable we would include_vars. We wouldn't want to run the role just JM> get the variable.
Ah, yeah; that (setting variables in a role that you want to use in other roles or plays) may be pushing the limits of how roles are intended to be used. Hmm. If you're just interested in filesystem cleanliness (i.e. if "move away from having a dumping ground" means "don't want an all.yml file with hundreds or thousands of variables tossed into it"), there might be some ways to do that. I don't see an obvious way to have a vars file include other files, alas. You could try ansible-quartermaster (https://github.com/caredotcom/ansible-quartermaster) and see if that helps; it allows you to have arbitrary thing.yml files in its aq.d directory, which all get merged together to form your eventual collection of inventory variables. (There isn't really an example of this there, I could put one togegther if it'd be useful.) -Josh ([email protected]) This email is intended for the person(s) to whom it is addressed and may contain information that is PRIVILEGED or CONFIDENTIAL. Any unauthorized use, distribution, copying, or disclosure by any person other than the addressee(s) is strictly prohibited. If you have received this email in error, please notify the sender immediately by return email and delete the message and any attachments from your system. -- 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/22057.989.558537.374267%40gargle.gargle.HOWL. For more options, visit https://groups.google.com/d/optout.
