Skip to content

Commit

Permalink
Merge stops and removes systemd services tasks in reset playbook (#10902
Browse files Browse the repository at this point in the history
)
  • Loading branch information
kimsehwan96 authored May 3, 2024
1 parent f82cf29 commit 5ce530c
Showing 1 changed file with 4 additions and 22 deletions.
26 changes: 4 additions & 22 deletions roles/reset/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
- kubelet.service
- cri-dockerd.service
- cri-dockerd.socket
- etcd.service
- etcd-events.service
failed_when: false
tags:
- services
Expand All @@ -24,6 +26,8 @@
- crio.service.d/http-proxy.conf
- k8s-certs-renew.service
- k8s-certs-renew.timer
- etcd.service
- etcd-events.service
register: services_removed
tags:
- services
Expand Down Expand Up @@ -134,28 +138,6 @@
ignore_errors: true # noqa ignore-errors
changed_when: true

- name: Reset | stop etcd services
service:
name: "{{ item }}"
state: stopped
with_items:
- etcd
- etcd-events
failed_when: false
tags:
- services

- name: Reset | remove etcd services
file:
path: "/etc/systemd/system/{{ item }}.service"
state: absent
with_items:
- etcd
- etcd-events
register: services_removed
tags:
- services

- name: Reset | remove containerd
when: container_manager == 'containerd'
block:
Expand Down

0 comments on commit 5ce530c

Please sign in to comment.