Ah, mine are all lumped in together, like this:

ansible-mystack:$ tree -L 1
.
├── Vagrantfile
├── ansible.cfg
├── group_vars
├── preprod_hosts
├── prod_hosts
├── roles
├── site.yml
└── vagrant_hosts

Are you talking about having a group_vars per inventory then?
Trying to figure out how that would look.



On 8 June 2014 16:29, Michael DeHaan <[email protected]> wrote:
> "problem with group_vars/all is that it's 'in the tree' - I'm trying to
> find a way to"
>
> You can keep this alongside your inventory (which most people do) rather
> than alongside your playbook, if you like.
>
>
>
>
>
> On Fri, Jun 6, 2014 at 9:08 AM, Dick Davies <[email protected]> wrote:
>>
>> Yeah we're about to try some of the cloud providers, I know this is
>> going to bite us.
>>
>> problem with group_vars/all is that it's 'in the tree' - I'm trying to
>> find a way to
>> have preprod_hosts and production_hosts contain everything
>> environment-specific,
>> so we can ensure roles/ group_vars/ etc. don't vary across different
>> environments.
>>
>> On 6 June 2014 13:34, Michael DeHaan <[email protected]> wrote:
>> > Don't do "all:vars", use a "group_vars/all" file instead.
>> >
>> > Not only is it cleaner for a static inventory, but it's usable with
>> > dynamic
>> > ones as well.
>> >
>> >
>> >
>> >
>> > On Thu, Jun 5, 2014 at 3:05 AM, Dick Davies <[email protected]>
>> > wrote:
>> >>
>> >> 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.
>> >
>> >
>> > --
>> > 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%2BnsWgx7v9AByVNy%2BDjszL3k1Ob%2BBK73J2uHWK%3DmOhduSekbaw%40mail.gmail.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/CAK5eLPR5XGV2%2BOkSd0Y1wrrKqNk2iCaX6Ftnh1-U5r58ZErqqQ%40mail.gmail.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/CA%2BnsWgw1thNLkz70wxRpOE9ov8p-%3Dk4DQdmBxwjAqFtA%3DQ903g%40mail.gmail.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/CAK5eLPQdNwOv%3DasfVGPafjVN-704d9R_3OKMxtt5vpKGoqBg-Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to