[libvirt] [jenkins-ci PATCH] guests: Clean up packages after update
Pavel Hrdina
phrdina at redhat.com
Thu Apr 12 08:29:40 UTC 2018
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 at 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 at redhat.com
> https://www.redhat.com/mailman/listinfo/libvir-list
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20180412/f45833ed/attachment-0001.sig>
More information about the libvir-list
mailing list