From 78d860bfcb53477e268429777567695c63d276a5 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Thu, 30 Jan 2020 13:27:10 +0000 Subject: [PATCH] Setup a cron job to cleanup docker containers --- ansible/roles/docker/tasks/setup-docker.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ansible/roles/docker/tasks/setup-docker.yml b/ansible/roles/docker/tasks/setup-docker.yml index f88c01b..61ccaaa 100644 --- a/ansible/roles/docker/tasks/setup-docker.yml +++ b/ansible/roles/docker/tasks/setup-docker.yml @@ -29,3 +29,9 @@ uid: "{{ docker_user.id }}" group: "{{ docker_user.name }}" create_home: false + +- name: Clean up docker containers + cron: + name: clean up docker containers + special_time: weekly + job: "docker system prune"