The `dyngroups.yml` playbook groups hosts dynamically based on gathered facts. Currently, the `ansible_os_family` fact is used to group hosts by Linux distribution.
7 lines
129 B
YAML
7 lines
129 B
YAML
- hosts: all
|
|
gather_facts: true
|
|
tasks:
|
|
- name: group hosts by distribution
|
|
group_by:
|
|
key={{ ansible_os_family }}
|