]> git.phdru.name Git - ansible.git/commitdiff
Fix(cleanup-pip-cache): Fix the order or operations
authorOleg Broytman <phd@phdru.name>
Mon, 13 Apr 2020 17:12:12 +0000 (20:12 +0300)
committerOleg Broytman <phd@phdru.name>
Mon, 13 Apr 2020 17:12:12 +0000 (20:12 +0300)
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

index e339681633a5feefef78153552099013a6776821..1368f7d26a5fbb1de58e878f18ca9a78ffaca8ad 100644 (file)
     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:
     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: