added wrapper role

This commit is contained in:
2021-12-22 22:23:42 +01:00
commit b71b53ac74
8 changed files with 64 additions and 0 deletions

19
tasks/main.yml Normal file
View File

@ -0,0 +1,19 @@
---
# tasks file for crio-cleanup
- name: "Check if cri-o is installed"
become: yes
package_facts:
manager: "auto"
tags: [ "cleanup", "prepare" ]
- name: fail if cri-o is not avaliable
fail:
msg: "crictl needs to be installed"
tags: [ "cleanup", "prepare" ]
- name: delete unused images
become: yes
command: "/usr/local/bin/crictl rmi --prune"
when: "'cri-o' in ansible_facts.packages"
tags: ["cleanup"]