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.
For more options, visit https://groups.google.com/d/optout.