dyngroups: Also group by distribution and version

Adding dynamic groups for speciffic Linux distributions and versions
thereof so we can apply settings based on those properties.
btop
Dustin 2022-12-19 10:20:09 -06:00
parent 3cc501abef
commit 4a1e961d57
1 changed files with 8 additions and 0 deletions

View File

@ -2,6 +2,14 @@
gather_facts: true gather_facts: true
tasks: tasks:
- name: group hosts by distribution - name: group hosts by distribution
group_by:
key: '{{ ansible_distribution }}'
changed_when: false
- name: group hosts by distribution+version
group_by:
key: '{{ ansible_distribution }}{{ ansible_distribution_major_version }}'
changed_when: false
- name: group hosts by os family
group_by: group_by:
key: '{{ ansible_os_family }}' key: '{{ ansible_os_family }}'
changed_when: false changed_when: false