added cronjob to prune unused docker stuff

This commit is contained in:
2023-06-16 18:31:14 +02:00
parent 408a78ebc0
commit f82d1d491c
2 changed files with 15 additions and 1 deletions

View File

@@ -0,0 +1,5 @@
---
- name: Restart cron
ansible.builtin.service:
name: cron
state: restarted

View File

@@ -59,4 +59,13 @@
ansible.builtin.file:
path: /home/{{ system_user_name }}/docker/
state: directory
mode: '0755'
mode: '0755'
- name: Create cronjob to prune unused docker stuff
ansible.builtin.cron:
user: "{{ system_user_name }}"
name: "prune unused docker stuff every night at 00:15"
minute: "15"
hour: "00"
job: "sudo docker system prune"
notify: Restart cron