kolla-ansible/docker/macros.j2
Abe Music 29fcb04cf3 enhancements to install_packages macro
- Adds debian_package_install method to the jinja environment
  that will return the necessary set of commands needed to
  install packages via apt-get and/or URLs to .deb packages
- Updates install_packages macro to make use of the method
  above

Change-Id: Ie9318a7def54b5034ba91375fd8fd3b589d18349
Partially-implements: blueprint third-party-plugin-support
2016-08-15 08:17:13 -05:00

13 lines
520 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'] -%}
{#-
debian_package_install is a utility method to build up an appropriate
set of commands to install packages in a debian-based environment that
may include URL links to a .deb package (e.g, heka)
-#}
{{ debian_package_install(packages) }}
{%- endif %}
{%- endmacro %}