
On Mon, Apr 09, 2018 at 03:56:05PM +0200, Andrea Bolognani wrote:
The package cache can grow to eat up a lot of disk space, and not removing unused packages can lead to upgrade issues down the line for fast moving distributions such as Fedora Rawhide.
Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- guests/tasks/base.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)
diff --git a/guests/tasks/base.yml b/guests/tasks/base.yml index 53cbd65..f419433 100644 --- a/guests/tasks/base.yml +++ b/guests/tasks/base.yml @@ -117,6 +117,25 @@ when: - package_format == 'pkg'
+- name: Clean up packages after update + command: yum clean packages -y + args: + warn: no + when: + - package_format == 'rpm'
Would it be possible to add 'yum autoremove -y'? Only CentOS 6 doesn't have that command. Otherwise looks good. Pavel
+ +- name: Clean up packages after update + apt: + autoclean: yes + autoremove: yes + when: + - package_format == 'deb' + +- name: Clean up packages after update + shell: pkg clean -y && pkg autoremove -y + when: + - package_format == 'pkg' + - name: Configure hostname hostname: name: '{{ inventory_hostname }}' -- 2.14.3
-- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list