do not remove package in validate container engine role when Fedora CoreOS distr (#8626)

pull/8631/head
Sergey 2022-03-17 16:49:20 +03:00 committed by GitHub
parent 21b1516d80
commit a86d9bd8e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 15 additions and 0 deletions

View File

@ -1,4 +1,16 @@
---
- name: validate-container-engine | check if fedora coreos
stat:
path: /run/ostree-booted
get_attributes: no
get_checksum: no
get_mime: no
register: ostree
- name: validate-container-engine | set is_ostree
set_fact:
is_ostree: "{{ ostree.stat.exists }}"
- name: Ensure kubelet systemd unit exists
stat:
path: "/etc/systemd/system/kubelet.service"
@ -64,6 +76,7 @@
tags:
- reset_containerd
when:
- not (is_ostree or (ansible_distribution == "Flatcar Container Linux by Kinvolk") or (ansible_distribution == "Flatcar"))
- container_manager != "containerd"
- docker_installed.matched == 0
- containerd_installed.matched > 0
@ -89,6 +102,7 @@
tags:
- reset_docker
when:
- not (is_ostree or (ansible_distribution == "Flatcar Container Linux by Kinvolk") or (ansible_distribution == "Flatcar"))
- container_manager != "docker"
- docker_installed.matched > 0
@ -113,5 +127,6 @@
tags:
- reset_crio
when:
- not (is_ostree or (ansible_distribution == "Flatcar Container Linux by Kinvolk") or (ansible_distribution == "Flatcar"))
- container_manager != "crio"
- crio_installed.matched > 0