If your variable information is about multiple hosts, it belongs in group_vars not host_vars. Consider applying more groups if you wish to include them.
vars_files is definitely subscribed, but most people set variables in roles now, rather than in the play at the top. You are welcome to use whatever works for you. Every environment is different. On Thu, Jul 24, 2014 at 3:39 AM, Luca Carboni <[email protected]> wrote: > I like group_vars and host_vars. > > Using group_vars and host_vars, we have a lot of files for hosts. > But, if we use group_vars, and vars_files, we can reduce drastically the > number of files, in one or two file, one for credentials and one for other > variables . > vars_files are not described in best practice, why ? why have lot of > host_vars, divided in files for hosts instead of one file included by > vars_files ? > with vars_files we can simplify the manitenance. > So we aren't understanding the use of host_vars ? > > > Il giorno mercoledì 23 luglio 2014 23:56:56 UTC+2, Michael DeHaan ha > scritto: >> >> Not understanding the question but we really love group_vars/ and >> host_vars/ a lot here. >> >> vars_files is more like if your play wants to bring in variables for that >> specific play, rather than describing info about those hosts. >> >> >> >> >> On Wed, Jul 23, 2014 at 12:07 PM, Luca Carboni <[email protected]> >> wrote: >> >>> Hi all, >>> I'm fine tuning roles for our farm. >>> we started with group_vars and host_vars, but it results dispersive, lot >>> of file in group_vars and more important number of files in host_vars. >>> We changed all to use vars_files, and now we have 2 files, one for >>> credentials and one for all the other variables. >>> >>> My question is, we don't understand how to right use of group_vars and >>> host_vars? Because they are in best practices, we there aren't vars_files. >>> >>> thanks all for answers. >>> >>> -- >>> 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/da4a69a1-eda0-4ea5-b1dd- >>> 90263022cdf1%40googlegroups.com >>> <https://groups.google.com/d/msgid/ansible-project/da4a69a1-eda0-4ea5-b1dd-90263022cdf1%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/327b8e8d-4a38-4cf0-a016-1c43b9734cf6%40googlegroups.com > <https://groups.google.com/d/msgid/ansible-project/327b8e8d-4a38-4cf0-a016-1c43b9734cf6%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%2BnsWgxQYv-VdzdJFm3TBn4W-HgRYH8ZnTAYm77wpoPo7HWEvA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
