From 0135fc0c2456de643b245a6486964ba0b0fb114e Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Mon, 13 Apr 2020 20:12:12 +0300 Subject: [PATCH] Fix(cleanup-pip-cache): Fix the order or operations Cleanup user, then report user's free space. Then cleanup root, then report root's free space. Necessary to not clobber user's data with root's. --- playbooks/roles/cleanup-pip-cache/tasks/main.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/playbooks/roles/cleanup-pip-cache/tasks/main.yml b/playbooks/roles/cleanup-pip-cache/tasks/main.yml index e339681..1368f7d 100644 --- a/playbooks/roles/cleanup-pip-cache/tasks/main.yml +++ b/playbooks/roles/cleanup-pip-cache/tasks/main.yml @@ -17,6 +17,12 @@ user: phd when: user_cache_exists.stat.exists +- name: du ~phd/.cache/pip + import_tasks: show-user.yml + vars: + user: phd + when: user_cache_exists.stat.exists + - name: Cleanup ~root/.cache/pip import_tasks: cleanup-user.yml vars: @@ -24,12 +30,6 @@ user: root when: root_cache_exists.stat.exists -- name: du ~phd/.cache/pip - import_tasks: show-user.yml - vars: - user: phd - when: user_cache_exists.stat.exists - - name: du ~root/.cache/pip import_tasks: show-user.yml vars: -- 2.39.2