Add cron job to prune unused Docker data (close #168)
This commit is contained in:
parent
604c67e28f
commit
96f65c02da
|
@ -27,6 +27,15 @@
|
||||||
- docker
|
- docker
|
||||||
- docker-compose
|
- 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
|
- name: create folder structure for bind mounts
|
||||||
file:
|
file:
|
||||||
name: "{{ volume_root_folder }}"
|
name: "{{ volume_root_folder }}"
|
||||||
|
|
Loading…
Reference in a new issue