diff --git a/roles/remove-node/post-remove/defaults/main.yml b/roles/remove-node/post-remove/defaults/main.yml new file mode 100644 index 00000000000..11298b973f1 --- /dev/null +++ b/roles/remove-node/post-remove/defaults/main.yml @@ -0,0 +1,3 @@ +--- +delete_node_retries: 10 +delete_node_delay_seconds: 3 diff --git a/roles/remove-node/post-remove/tasks/main.yml b/roles/remove-node/post-remove/tasks/main.yml index 31dd462f491..d1d0535c09a 100644 --- a/roles/remove-node/post-remove/tasks/main.yml +++ b/roles/remove-node/post-remove/tasks/main.yml @@ -1,10 +1,10 @@ --- -- name: Delete node +- name: remove-node | Delete node command: "{{ kubectl }} delete node {{ kube_override_hostname|default(inventory_hostname) }}" delegate_to: "{{ groups['kube_control_plane']|first }}" when: inventory_hostname in groups['k8s_cluster'] - retries: 10 + retries: "{{ delete_node_retries }}" # Sometimes the api-server can have a short window of indisponibility when we delete a master node - delay: 3 + delay: "{{ delete_node_delay_seconds }}" register: result until: result is not failed