group_by
Collection: builtin
Full Name: group_by
Aliases: ansible.builtin.group_by
Controller module — runs on the local controller, not on remote hosts.
Synopsis
Manage group by
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| key | string | yes | The variable expression to use for grouping. The result is used as the group name. | |
| parents | list | [all] | The list of parent groups to add the new group to. |
Example
- name: Example group_by task
group_by:
key: <your_key>