From 77d43abbe799371153f8f7f2945e9d286b457bc2 Mon Sep 17 00:00:00 2001 From: Kevin Gallagher Date: Mon, 17 Oct 2016 15:07:39 -0700 Subject: [PATCH] Clean the apt cache at the end of provisioning The VirtualBox VM is running tight on available space with nearly 100% usage. This frees things up a bit by cleaning the apt cache after Gitian installation. --- roles/common/tasks/update_everything.yml | 6 ------ roles/gitian/tasks/main.yml | 5 +++++ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/roles/common/tasks/update_everything.yml b/roles/common/tasks/update_everything.yml index 77f0ce2..6a0bebc 100644 --- a/roles/common/tasks/update_everything.yml +++ b/roles/common/tasks/update_everything.yml @@ -42,9 +42,3 @@ register: autoremove_result changed_when: "'0 upgraded' not in autoremove_result.stdout" tags: apt - -- name: Clean the apt cache. - command: apt-get autoclean - register: autoclean_result - changed_when: "'Del' in autoclean_result.stdout" - tags: apt diff --git a/roles/gitian/tasks/main.yml b/roles/gitian/tasks/main.yml index 95671de..574dc25 100644 --- a/roles/gitian/tasks/main.yml +++ b/roles/gitian/tasks/main.yml @@ -199,6 +199,11 @@ chdir: "/home/{{ gitian_user }}/gitian-builder" executable: /bin/bash +- name: Clean the apt cache to free up space. + command: apt-get autoclean + register: autoclean_result + changed_when: "'Del' in autoclean_result.stdout" + - include: gpg.yml tags: gpg become: no