Add cron job to prune unused Docker data (close #168)

This commit is contained in:
Sam A. 2023-07-07 18:15:01 +02:00
parent 604c67e28f
commit 96f65c02da
Signed by untrusted user: samsapti
GPG key ID: CBBBE7371E81C4EA

View file

@ -27,6 +27,15 @@
- docker
- docker-compose
- name: Configure cron job to prune unused Docker data weekly
cron:
name: Prune unused Docker data
cron_file: ansible_docker_prune
job: 'docker system prune -fa && docker volume prune -fa'
special_time: weekly
user: root
state: present
- name: create folder structure for bind mounts
file:
name: "{{ volume_root_folder }}"