29fcb04cf3
- 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
13 lines
520 B
Django/Jinja
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 %}
|