From 49c4345c9ae3a4ca194ce8123e08ee009bab6b4a Mon Sep 17 00:00:00 2001 From: Etienne Champetier Date: Thu, 21 Jan 2021 17:31:02 -0500 Subject: [PATCH] preinstall: etcd group might not exists (#7202) fixes 8c1821228df4598d139aa4f9729799291350a470 Signed-off-by: Etienne Champetier --- roles/kubernetes/preinstall/tasks/0020-verify-settings.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/roles/kubernetes/preinstall/tasks/0020-verify-settings.yml b/roles/kubernetes/preinstall/tasks/0020-verify-settings.yml index a7c6299e8..c80ffe22a 100644 --- a/roles/kubernetes/preinstall/tasks/0020-verify-settings.yml +++ b/roles/kubernetes/preinstall/tasks/0020-verify-settings.yml @@ -69,8 +69,7 @@ that: groups.etcd|length is not divisibleby 2 when: - not ignore_assert_errors - - groups.get('etcd') - - inventory_hostname in groups['etcd'] + - inventory_hostname in groups.get('etcd',[]) - name: Stop if memory is too small for masters assert: @@ -274,7 +273,7 @@ that: etcd_deployment_type in ['host', 'docker'] msg: "The etcd deployment type, 'etcd_deployment_type', must be host or docker" when: - - inventory_hostname in groups['etcd'] + - inventory_hostname in groups.get('etcd',[]) - not etcd_kubeadm_enabled - name: Stop if etcd deployment type is not host when container_manager != docker @@ -282,7 +281,7 @@ that: etcd_deployment_type == 'host' msg: "The etcd deployment type, 'etcd_deployment_type', must be host when container_manager is not docker" when: - - inventory_hostname in groups['etcd'] + - inventory_hostname in groups.get('etcd',[]) - not etcd_kubeadm_enabled - container_manager != 'docker'