Browse Source

Fix: cannot stop & remove all cri containers via remove_node.yml (#11631)

Before adding these changes, `ansible_facts.services["containerd.service"]` will not defined and fail to check for triggering the container stop and delete behaviors.

Signed-off-by: ChengHao Yang <17496418+tico88612@users.noreply.github.com>
pull/11642/head
ChengHao Yang 1 month ago
committed by GitHub
parent
commit
687fa3dbed
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 0 deletions
  1. 4
      playbooks/remove_node.yml

4
playbooks/remove_node.yml

@ -27,6 +27,10 @@
hosts: "{{ node | default('kube_node') }}"
gather_facts: false
environment: "{{ proxy_disable_env }}"
pre_tasks:
- name: Gather information about installed services
service_facts:
when: reset_nodes | default(True) | bool
roles:
- { role: kubespray-defaults, when: reset_nodes | default(True) | bool }
- { role: remove-node/pre-remove, tags: pre-remove }

Loading…
Cancel
Save