From 3c1f84a9e9dd36e9737667fe90a159b600c6e3a3 Mon Sep 17 00:00:00 2001 From: seowon <30580971+yonwon01@users.noreply.github.com> Date: Thu, 31 Dec 2020 00:15:49 +0900 Subject: [PATCH] [fix] change result conditions (#6973) --- roles/remove-node/pre-remove/tasks/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/remove-node/pre-remove/tasks/main.yml b/roles/remove-node/pre-remove/tasks/main.yml index 3c7c0622543..563fa036eb8 100644 --- a/roles/remove-node/pre-remove/tasks/main.yml +++ b/roles/remove-node/pre-remove/tasks/main.yml @@ -5,7 +5,7 @@ with_items: - "{{ node.split(',') | default(groups['kube-node']) }}" register: result - failed_when: result.rc == 0 and not allow_ungraceful_removal + failed_when: result.rc != 0 and not allow_ungraceful_removal delegate_to: "{{ groups['kube-master']|first }}" run_once: true ignore_errors: yes @@ -21,7 +21,7 @@ with_items: - "{{ node.split(',') | default(groups['kube-node']) }}" register: result - failed_when: result.rc == 0 and not allow_ungraceful_removal + failed_when: result.rc != 0 and not allow_ungraceful_removal delegate_to: "{{ groups['kube-master']|first }}" run_once: true ignore_errors: yes