I do the per environment inventories too (partly because they're datacenter/vagrant) and had a few groups just to target one-off plays.
My per-environment settings usually tuck into [all:vars] in the inventory - I've no idea how I'm going to map that to a dynamic inventory yet, probably a lot of set_fact roles to set everything up. I keep them in step by diffing :( Re: the group composition - I needed that for some one-off plays, it turns out you can target multiple groups in a play with something like ..... - hosts: mysql:redis sudo: yes tasks: ..... On 4 June 2014 02:20, Michael Mahemoff <[email protected]> wrote: > As I have separate "staging" and "production" inventory files, I end up > duplicating some group compositions (e.g. databases:children is > mysql:children and redis:children, that kind of thing). I'm wondering if > there's a way to consolidate that logic, such as a directive to include a > file. Or maybe some trick I'm missing here. > > -- > 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/bbe12ef1-69ea-4e65-9a6e-0359246cc017%40googlegroups.com. > 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/CAK5eLPTbDfWrvxzO_e-A5V_0hqoH_yN6d3f0TZ-ywUbLsQHmEg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
