2022-03-17 07:28:11 +08:00
|
|
|
---
|
2023-07-26 22:36:22 +08:00
|
|
|
- name: Runc | Download cri-dockerd binary
|
2022-03-17 07:28:11 +08:00
|
|
|
include_tasks: "../../../download/tasks/download_file.yml"
|
|
|
|
vars:
|
|
|
|
download: "{{ download_defaults | combine(downloads.cri_dockerd) }}"
|
|
|
|
|
|
|
|
- name: Copy cri-dockerd binary from download dir
|
|
|
|
copy:
|
|
|
|
src: "{{ local_release_dir }}/cri-dockerd"
|
|
|
|
dest: "{{ bin_dir }}/cri-dockerd"
|
2024-07-26 09:42:20 +08:00
|
|
|
mode: "0755"
|
2022-03-17 07:28:11 +08:00
|
|
|
remote_src: true
|
|
|
|
notify:
|
2023-07-26 22:36:22 +08:00
|
|
|
- Restart and enable cri-dockerd
|
2022-03-17 07:28:11 +08:00
|
|
|
|
|
|
|
- name: Generate cri-dockerd systemd unit files
|
|
|
|
template:
|
|
|
|
src: "{{ item }}.j2"
|
|
|
|
dest: "/etc/systemd/system/{{ item }}"
|
2024-07-26 09:42:20 +08:00
|
|
|
mode: "0644"
|
2023-11-18 03:01:23 +08:00
|
|
|
validate: "sh -c '[ -f /usr/bin/systemd/system/factory-reset.target ] || exit 0 && systemd-analyze verify %s:{{ item }}'"
|
|
|
|
# FIXME: check that systemd version >= 250 (factory-reset.target was introduced in that release)
|
|
|
|
# Remove once we drop support for systemd < 250
|
2022-03-17 07:28:11 +08:00
|
|
|
with_items:
|
|
|
|
- cri-dockerd.service
|
|
|
|
- cri-dockerd.socket
|
|
|
|
notify:
|
2023-07-26 22:36:22 +08:00
|
|
|
- Restart and enable cri-dockerd
|
2022-08-24 20:50:02 +08:00
|
|
|
|
|
|
|
- name: Flush handlers
|
|
|
|
meta: flush_handlers
|