diff options
| author | Abe Music <abe.music@gmail.com> | 2016-07-28 16:31:16 -0500 |
|---|---|---|
| committer | Abe Music <abe.music@gmail.com> | 2016-08-15 08:17:13 -0500 |
| commit | 29fcb04cf38de41276b2b23e69e86d898efe5afb (patch) | |
| tree | e97756d5165a4e879ea095000bec15066452e1bb /docker | |
| parent | 6ea99983fcaf13f90efff1c20a3aa20db0af92ba (diff) | |
| download | kolla-29fcb04cf38de41276b2b23e69e86d898efe5afb.tar.gz kolla-29fcb04cf38de41276b2b23e69e86d898efe5afb.zip | |
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
Diffstat (limited to 'docker')
| -rw-r--r-- | docker/macros.j2 | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/docker/macros.j2 b/docker/macros.j2 index c10973ef6..5cdb12b4c 100644 --- a/docker/macros.j2 +++ b/docker/macros.j2 @@ -1,7 +1,12 @@ {% macro install_packages(packages) -%} {% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] -%} - yum -y install {{ packages | join(' ') }} && yum clean all + 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 + {#- + 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 %} |
