You can't use group_by stuff at that point because it hasn't run yet, true,
but there is a solution to what you would like to do, using two plays in
the same playbook

- hosts: all
  tasks:
     - group_by: key=os-{{ ansible_distribution }}

- hosts: "{{ distro | default('all') }}"
  tasks:
     - action: ping
     - ...

ansible-playbook foo.yml -e "pattern=os-Fedora"



On Fri, Sep 12, 2014 at 10:54 AM, Serge van Ginderachter <
[email protected]> wrote:

>
> On 12 September 2014 16:48, Willard Dennis <[email protected]>
> wrote:
>
>> So am I doing this incorrectly, or for some reason, is the "os-Fedora"
>> group empty? (i.e. the logic is not matching any hosts)
>
>
>
> ​The --limit happens early, at initialization​, and at that time the group
> is indeed empty.
>
> AFAIK, there is no workaround for this.
>
> --
> 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/CAEhzMJCq7U64k88uUMmFhO_Arwqr%3DhOdFCTzHUgMLg8jxiPD4Q%40mail.gmail.com
> <https://groups.google.com/d/msgid/ansible-project/CAEhzMJCq7U64k88uUMmFhO_Arwqr%3DhOdFCTzHUgMLg8jxiPD4Q%40mail.gmail.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/CA%2BnsWgwh2NxtE43Zxhm-b7D-oYHL_TC5%3D8_aQ226bcNzAmC8rg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to