kolla-ansible/docker/macros.j2
Michal (inc0) Jastrzebski f1c3422582 Macro install packages
Simplification of package installations

Change-Id: I78c0a84c55e891dec7c9bd21bc61700dba244526
Partially-implements: blueprint third-party-plugin-support
2016-06-15 19:42:02 +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 %}