mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2025-12-13 21:34:40 +03:00
cleanup: don't cleanup runc orphan binary on immutable distros (#12669)
This commit is contained in:
@@ -12,11 +12,20 @@
|
||||
is_ostree: "{{ ostree.stat.exists }}"
|
||||
|
||||
- name: Runc | Uninstall runc package managed by package manager
|
||||
package:
|
||||
name: "{{ runc_package_name }}"
|
||||
state: absent
|
||||
when:
|
||||
- not (is_ostree or (ansible_distribution == "Flatcar Container Linux by Kinvolk") or (ansible_distribution == "Flatcar"))
|
||||
- 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"
|
||||
@@ -29,10 +38,3 @@
|
||||
dest: "{{ runc_bin_dir }}/runc"
|
||||
mode: "0755"
|
||||
remote_src: true
|
||||
|
||||
- name: Runc | Remove orphaned binary
|
||||
file:
|
||||
path: /usr/bin/runc
|
||||
state: absent
|
||||
when: runc_bin_dir != "/usr/bin"
|
||||
ignore_errors: true # noqa ignore-errors
|
||||
|
||||
Reference in New Issue
Block a user