Browse Source
do not remove package in validate container engine role when Fedora CoreOS distr (#8626)
pull/8631/head
Sergey
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
15 additions and
0 deletions
-
roles/container-engine/validate-container-engine/tasks/main.yml
|
@ -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 |
|
|
- name: Ensure kubelet systemd unit exists |
|
|
stat: |
|
|
stat: |
|
|
path: "/etc/systemd/system/kubelet.service" |
|
|
path: "/etc/systemd/system/kubelet.service" |
|
@ -64,6 +76,7 @@ |
|
|
tags: |
|
|
tags: |
|
|
- reset_containerd |
|
|
- reset_containerd |
|
|
when: |
|
|
when: |
|
|
|
|
|
- not (is_ostree or (ansible_distribution == "Flatcar Container Linux by Kinvolk") or (ansible_distribution == "Flatcar")) |
|
|
- container_manager != "containerd" |
|
|
- container_manager != "containerd" |
|
|
- docker_installed.matched == 0 |
|
|
- docker_installed.matched == 0 |
|
|
- containerd_installed.matched > 0 |
|
|
- containerd_installed.matched > 0 |
|
@ -89,6 +102,7 @@ |
|
|
tags: |
|
|
tags: |
|
|
- reset_docker |
|
|
- reset_docker |
|
|
when: |
|
|
when: |
|
|
|
|
|
- not (is_ostree or (ansible_distribution == "Flatcar Container Linux by Kinvolk") or (ansible_distribution == "Flatcar")) |
|
|
- container_manager != "docker" |
|
|
- container_manager != "docker" |
|
|
- docker_installed.matched > 0 |
|
|
- docker_installed.matched > 0 |
|
|
|
|
|
|
|
@ -113,5 +127,6 @@ |
|
|
tags: |
|
|
tags: |
|
|
- reset_crio |
|
|
- reset_crio |
|
|
when: |
|
|
when: |
|
|
|
|
|
- not (is_ostree or (ansible_distribution == "Flatcar Container Linux by Kinvolk") or (ansible_distribution == "Flatcar")) |
|
|
- container_manager != "crio" |
|
|
- container_manager != "crio" |
|
|
- crio_installed.matched > 0 |
|
|
- crio_installed.matched > 0 |