Skip to content

Commit

Permalink
Fix: cannot stop & remove all cri containers via remove_node.yml (#11631
Browse files Browse the repository at this point in the history
)

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 <[email protected]>
  • Loading branch information
tico88612 authored Oct 15, 2024
1 parent 616e4b4 commit 687fa3d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions playbooks/remove_node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down

0 comments on commit 687fa3d

Please sign in to comment.