mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-02-28 09:39:12 +03:00
Test group membership with group_names
Testing for group membership with group names makes Kubespray more tolerant towards the structure of the inventory. Where 'inventory_hostname in groups["some_group"] would fail if "some_group" is not defined, '"some_group" in group_names' would not.
This commit is contained in:
@@ -51,7 +51,7 @@
|
||||
register: "etcd_client_cert_serial_result"
|
||||
changed_when: false
|
||||
when:
|
||||
- inventory_hostname in groups['k8s_cluster'] | union(groups['calico_rr'] | default([])) | unique | sort
|
||||
- group_names | intersect(['k8s_cluster', 'calico_rr']) | length > 0
|
||||
tags:
|
||||
- network
|
||||
|
||||
|
||||
Reference in New Issue
Block a user