From: Oleg Broytman Date: Mon, 13 Apr 2020 17:12:12 +0000 (+0300) Subject: Fix(cleanup-pip-cache): Fix the order or operations X-Git-Url: https://git.phdru.name/?p=ansible.git;a=commitdiff_plain;h=0135fc0c2456de643b245a6486964ba0b0fb114e 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. --- 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: