mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2025-12-13 21:34:40 +03:00
Simplify group_by logic by moving conditional to when clause (#12469)
Signed-off-by: Ali Afsharzadeh <afsharzadeh8@gmail.com>
This commit is contained in:
@@ -15,5 +15,6 @@
|
|||||||
- kube_control_plane
|
- kube_control_plane
|
||||||
- calico_rr
|
- calico_rr
|
||||||
group_by:
|
group_by:
|
||||||
key: "{{ (group_names | intersect(item.value) | length > 0) | ternary(item.key, '_all') }}"
|
key: "{{ item.key }}"
|
||||||
|
when: group_names | intersect(item.value) | length > 0
|
||||||
loop: "{{ group_mappings | dict2items }}"
|
loop: "{{ group_mappings | dict2items }}"
|
||||||
|
|||||||
Reference in New Issue
Block a user