Skip to content

Commit

Permalink
do not remove package in validate container engine role when Fedora C…
Browse files Browse the repository at this point in the history
…oreOS distr (#8626)
  • Loading branch information
LuckySB authored Mar 17, 2022
1 parent 21b1516 commit a86d9bd
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions roles/container-engine/validate-container-engine/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down Expand Up @@ -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
Expand All @@ -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

Expand All @@ -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

0 comments on commit a86d9bd

Please sign in to comment.