Revert "Remove files from /var/lib/apt/lists when cleaning up on Ubuntu/Debian"

This reverts commit 4e8bf3f90d.

It seems removing /var/lib/apt/lists is having some unintended side
effects causing apt to not find packages [0]

[0] http://logs.openstack.org/87/350587/10/check/gate-kolla-dsvm-build-ubuntu-source/c0a22a3/console.html#_2016-08-09_13_41_14_477480

Change-Id: I89042e5883f19fddbae11d75b788f87ad5d871a1
This commit is contained in:
Paul Bourke 2016-08-10 11:40:30 +00:00
parent b649bb7d4a
commit 495a905b80

View File

@ -2,6 +2,6 @@
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] -%}
yum -y install {{ packages | join(' ') }} && yum clean all
{%- elif base_distro in ['ubuntu', 'debian'] -%}
apt-get -y install --no-install-recommends {{ packages | join(' ') }} && apt-get clean && rm -rf /var/lib/apt/lists/*
apt-get -y install --no-install-recommends {{ packages | join(' ') }} && apt-get clean
{%- endif %}
{%- endmacro %}