41 lines
1.0 KiB
YAML

---
- name: Runc | check if fedora coreos
stat:
path: /run/ostree-booted
get_attributes: false
get_checksum: false
get_mime: false
register: ostree
- name: Runc | set is_ostree
set_fact:
is_ostree: "{{ ostree.stat.exists }}"
- name: Runc | Uninstall runc package managed by package manager
when:
- not is_ostree
- ansible_distribution != "Flatcar Container Linux by Kinvolk"
- ansible_distribution != "Flatcar"
block:
- name: Runc | Remove package
package:
name: "{{ runc_package_name }}"
state: absent
- name: Runc | Remove orphaned binary
file:
path: /usr/bin/runc
state: absent
when: runc_bin_dir != "/usr/bin"
- 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