From 3111c69814fdfb4295d576452525cd998fc7d632 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Mon, 9 Sep 2024 19:41:17 +0100 Subject: [PATCH] Run docker cleanup as a user who can access the socket --- ansible/roles/docker_cleanup/tasks/main.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ansible/roles/docker_cleanup/tasks/main.yml b/ansible/roles/docker_cleanup/tasks/main.yml index ea84955..f2e5e13 100644 --- a/ansible/roles/docker_cleanup/tasks/main.yml +++ b/ansible/roles/docker_cleanup/tasks/main.yml @@ -41,7 +41,8 @@ hour: 1 minute: 0 job: docker system prune -af --volumes - user: "{{ docker_user.name }}" + cron_file: docker_cleanup + user: root - name: Install util scripts copy: