I have no problem with patches to allow limit groups to be set in
play. I could see this being particularly useful when used
with the group_by module.
If the CLI --limit flag is used it should only set the limit for those
plays that do not have a limit set.
FYI -- Putting a dash in front of everything above is incorrect, as a
dash indicates the start of a new list entry.
It should work EXACTLY like the command line, in fact, all this would
be doing would be sourcing the data from the play object rather than
the CLI value, if one was set.
>
> I.e. if I have both debian and redhat webservers in London and New York, and
> I run the above plays with CLI --limit london, that shouldn't be ignored
> should it? Rather only debian and redhat webservers in london should be
> touched...
that is pretty much what it does, right? :)
But what is missing is an intersection option, like (made-up syntax):
hosts: webservers#debian
My preference is to implement union, intersection and complement from set
theory and create a syntax for priority rules, etc...
This would rock, I currently use extravars to set host for most of my playbooks, this is much more elegant.
Brian Coca
There are other symbols to be used.
'&' meaning union
'|' meaning intersection
'^' meaning complement
While I agree that set theory operations sound powerful, we are
required to add things in ways that don't break existing usage, and
don't seem redundant or different. Thus if --limit has to continue
to work the way it works now, and does hosts, I don't want another
syntax that feels completely different in ways where you have to be
able to read both. That's a mess.
On Sat, Dec 8, 2012 at 1:12 PM, Ashley Penney <ape...@gmail.com> wrote:
> tag_Group_webservers AND tag_environment_production AND tag_variant_test
I think this is the sticky one.