kolla-ansible/docker/macros.j2
Paul Bourke 495a905b80 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
2016-08-10 11:46:48 +00:00

8 lines
342 B
Django/Jinja

{% macro install_packages(packages) -%}
{% 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
{%- endif %}
{%- endmacro %}