added wrapper role
This commit is contained in:
19
tasks/main.yml
Normal file
19
tasks/main.yml
Normal 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"]
|
Reference in New Issue
Block a user