verify settings: fix etcd assertion when implicity etcd group

When the etcd group is not specified we assume it's kube_control_plane.
In that case, etcd still can't be even, so instead of only checking the
etcd group we need to default to kube_control_plane
This commit is contained in:
Max Gautier
2025-01-20 10:35:23 +01:00
parent f53552e56b
commit 98cdb5348c

View File

@@ -74,10 +74,10 @@
- name: Stop if even number of etcd hosts
assert:
that: groups.etcd | length is not divisibleby 2
that: groups.get('etcd', groups.kube_control_plane) | length is not divisibleby 2
run_once: true
when:
- not ignore_assert_errors
- inventory_hostname in groups.get('etcd',[])
- name: Stop if memory is too small for control plane nodes
assert: