ansible/roles/docker/tasks/docker-cron.yml

18 lines
380 B
YAML
Raw Normal View History

2022-06-04 20:55:54 +00:00
- name: Clean docker system
become: yes
ansible.builtin.cron:
user: root
name: "clean docker system"
minute: "0"
hour: "3"
job: "/usr/bin/docker system prune -f"
- name: Clean docker image cache
become: yes
ansible.builtin.cron:
user: root
name: "clean docker system"
minute: "0"
hour: "3"
job: "/usr/bin/docker image prune -a -f"