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

NameTypeRequiredDefaultDescription
keystringyesThe variable expression to use for grouping. The result is used as the group name.
parentslist[all]The list of parent groups to add the new group to.

Example

- name: Example group_by task
  group_by:
    key: <your_key>