I like using group_vars and host_vars for these things, though it should be noted it's a good idea to keep your production and dev inventory in different files, to avoid the chance of doing "-i inventory.ini" against the all group and managing them simultaneously.
On Fri, Nov 14, 2014 at 4:18 AM, Tomasz Kontusz <[email protected]> wrote: > You can get common group_vars, by either using directory per group + > symlinks, or putting group_vars next to playbook (they would be loaded in > addition to those next to inventory). > > The second one used to have problems with vars for the same group defined > in both places, but you can work around this by making separate *_common > groups. > > Torsten Reinhard <[email protected]> napisał: >> >> Hi all, >> >> we started to create our inventory and in the beginning we were just fine >> with the host_vars and group_vars option to place our properties. >> Now, for some configuration we have almost the same settings on DEV, TEST >> and PROD environment and I´m think about where to put them. >> >> Of course, I can put the common properties to roles/.../vars or directly >> into the playbook >> - but than it ends up with a "configuration management" based on >> inventory and vars files in the playbooks, roles or whereever. >> >> I know about the group_vars/all option - but this is only for one >> environment - not for many like >> >> inventory/trunk/ >> - dev1 >> hosts >> - .. >> - dev3 >> - test1 >> - .. >> - prod >> hosts >> >> >> >> What is best practice to manage such "common inventory properties" - and >> to dont end up with some properties here, others there in the filesystem ? >> >> Is the only way a dynamic inventory that will than solve this problem in >> its implementation? >> >> Thanx, Torsten >> >> >> >> >> > -- > Wysłane za pomocą K-9 Mail. > > -- > 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/ed5c4e18-135d-4664-9fc9-61f5eacea106%40email.android.com > <https://groups.google.com/d/msgid/ansible-project/ed5c4e18-135d-4664-9fc9-61f5eacea106%40email.android.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%2BnsWgzGQkzqpz3czqt2rYKEze51Rv2iPpxfGMeNZwwW2U-AGQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
