diff --git a/roles/remove-node/pre-remove/tasks/main.yml b/roles/remove-node/pre-remove/tasks/main.yml index 3c7c06225..563fa036e 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