"but it looks like this doesn't automatically load anything i have in
group_vars for those new groups"

When you say "new groups", do you mean the group is not defined in
inventory or is defined and does not have hosts?

In either case, I would like this would work, yes.

This seems like (if reproducible on devel) there should be a ticket opened.

I don't think it would break precedence and could be done in a reasonably
sane way, but I haven't really dug in yet.






On Fri, Jan 3, 2014 at 1:18 PM, Matt Coddington <codding...@gmail.com>wrote:

> I use group_by to set up some groups in a play, but it looks like this
> doesn't automatically load anything i have in group_vars for those new
> groups.  I suspect group_vars are getting picked up only at the beginning
> of a play.
>
> If you know the set of groups you're creating with group_by, you can add
> an include_vars just after the grouping, which is how i'm working with
> things for now.  How are other folks dealing with this?  I was at first
> thinking it might be nice for group_by to implicitly load group_vars when
> it sets up groups, but then realized this could break variable precedence.
>  Is it a valid feature request, maybe one that could be configurable, or
> should I look to work around things (via include_vars and/or by making sure
> anything that needs group_vars exists in my inventory as opposed to trying
> to set it up in group_by)?
>
> thanks,
> matt
>
>  --
> 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 ansible-project+unsubscr...@googlegroups.com.
> To post to this group, send email to ansible-project@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>



-- 
Michael DeHaan <mich...@ansibleworks.com>
CTO, AnsibleWorks, Inc.
http://www.ansibleworks.com/

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to