Sounds like the filter failed to parse your regex, or there was no
regex_replace filter in that version of Ansible.

I agree this should produce an exception in these cases.

What version of Ansible are you on?





On Tue, Apr 22, 2014 at 11:06 PM, Camp Nou <[email protected]> wrote:

>
> It seems group_by doesn't support filters?
>
> '''
> - hosts: all
>   tasks:
>     - name: group hosts by inventory hostname
>       group_by: key="{{ inventory_hostname |
> regex_replace('.+\\.(prod|test|dev)\\.example\\.org', '\\1') }}"
> '''
> The task doesn't work.
> It will generate a group with the name "{{
> inventory_hostname-|-regex_replace('.+\\.(prod|test|dev)\\.example\\.org',
> '\\1') }}"
>
>  --
> 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/7c78880d-d860-49f2-9e2a-f05a6ac4ba64%40googlegroups.com<https://groups.google.com/d/msgid/ansible-project/7c78880d-d860-49f2-9e2a-f05a6ac4ba64%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/CA%2BnsWgyv_iX2x7iUWugRd7CMarQPHb_Q847ySrKBj3ZvFFD6wg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to