Thanks for the reply Michael. I think that would work. However, it's
getting complicated since I've implemented your recommendation for handling
environments using groups
(https://groups.google.com/forum/#!searchin/ansible-project/inventory$20staging/ansible-project/jd3cuR7rqCE/v7jaH-_BAgAJ).
I now have a "production" group and a "staging" group. Mixing in roles via
includes seems like its overloading the groups concept more than I would
like.
By the way, this has gotten me thinking about Ansible's conceptual model,
that is hierarchy of Ansible's object from the user's perspective. I
understand the relationship between host, group, and role objects but when
it comes to "site", inventory, and the top of the model it gets a bit
murky. Do you have something like as UML class diagram that shows this
model? The reason I ask is that I'm thinking a new object such as an
"environment" at the top (or perhaps under a "site") might be a simpler way
than groups to manage production, staging, etc.
Site
- 1..n Environment
- 1..n Groups
- 1..n Hosts
--Aaron
On Wednesday, April 23, 2014 10:26:55 AM UTC-4, Michael DeHaan wrote:
>
> It's unlikely we'd want to add more CLI options for this purpose.
>
> However, there are easy workarounds if you would like this behavior.
>
> Consider your site.yml (a file that configures all of your infrastructure)
> if it were like this:
>
> - include: webservers.yml
> - include: dbservers.yml
> - include: other.yml
>
> If you want to run just servers in the "dbservers" role, instead of
> running site.yml, just run "dbservers.yml" instead.
>
> This trick is using playbooks to include other playbooks (because a
> playbook is just, in the end, a list of plays in order).
>
> --Michael
>
>
> On Wed, Apr 23, 2014 at 10:19 AM, Aaron Hunter
> <[email protected]<javascript:>
> > wrote:
>
>> While testing I often want to limit my run to a specific role. I know
>> limiting can be done by host and by tag but did you ever consider adding a
>> "-r" limit by role option to the ansible-playbook command?
>>
>> Thanks,
>> Aaron
>>
>> --
>> 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] <javascript:>.
>> To post to this group, send email to [email protected]<javascript:>
>> .
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/ansible-project/0bc34a77-fc27-4791-a65a-b4d2174201d1%40googlegroups.com<https://groups.google.com/d/msgid/ansible-project/0bc34a77-fc27-4791-a65a-b4d2174201d1%40googlegroups.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/b877cbe4-f013-4615-b82b-a8ddfdcd0d92%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.