Add dockerclean
This commit is contained in:
14
dockerclean
Normal file
14
dockerclean
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
---
|
||||||
|
- name: Prune unused Docker images
|
||||||
|
hosts: all
|
||||||
|
become: yes
|
||||||
|
tasks:
|
||||||
|
- name: Prune dangling images
|
||||||
|
ansible.builtin.shell: docker image prune -f
|
||||||
|
args:
|
||||||
|
warn: false
|
||||||
|
|
||||||
|
- name: Prune all unused images
|
||||||
|
ansible.builtin.shell: docker image prune -a -f
|
||||||
|
args:
|
||||||
|
warn: false
|
||||||
Reference in New Issue
Block a user