2021-10-20 15:47:58 +00:00
|
|
|
---
|
2021-11-05 14:53:53 +00:00
|
|
|
- name: runc | set is_ostree
|
|
|
|
set_fact:
|
|
|
|
is_ostree: "{{ ostree.stat.exists }}"
|
|
|
|
|
2021-10-20 15:47:58 +00:00
|
|
|
- name: runc | Uninstall runc package managed by package manager
|
|
|
|
package:
|
|
|
|
name: "{{ runc_package_name }}"
|
|
|
|
state: absent
|
2021-11-05 14:53:53 +00:00
|
|
|
when:
|
|
|
|
- not (is_ostree or (ansible_distribution == "Flatcar Container Linux by Kinvolk") or (ansible_distribution == "Flatcar"))
|
2021-10-20 15:47:58 +00:00
|
|
|
|
|
|
|
- name: runc | Download runc binary
|
|
|
|
include_tasks: "../../../download/tasks/download_file.yml"
|
|
|
|
vars:
|
|
|
|
download: "{{ download_defaults | combine(downloads.runc) }}"
|
|
|
|
|
|
|
|
- name: Copy runc binary from download dir
|
|
|
|
copy:
|
|
|
|
src: "{{ downloads.runc.dest }}"
|
|
|
|
dest: "{{ runc_bin_dir }}/runc"
|
|
|
|
mode: 0755
|
|
|
|
remote_src: true
|
2021-11-05 14:53:53 +00:00
|
|
|
|
|
|
|
- name: runc | Remove orphaned binary
|
|
|
|
file:
|
|
|
|
path: /usr/bin/runc
|
|
|
|
state: absent
|
|
|
|
when: runc_bin_dir != "/usr/bin"
|
|
|
|
ignore_errors: true # noqa ignore-errors
|