diff options
| author | Michal (inc0) Jastrzebski <inc007@gmail.com> | 2016-06-07 20:54:37 +0000 |
|---|---|---|
| committer | Michal (inc0) Jastrzebski <inc007@gmail.com> | 2016-06-15 19:42:02 +0000 |
| commit | f1c3422582ef3368647f3459b04c4c0b67f8e1ee (patch) | |
| tree | 47358ab3685beeecd880ebf0a753ff87a3ee1551 /docker | |
| parent | 2cb0f445bba72d5b085856deb57a5e48c5832ca9 (diff) | |
| download | kolla-f1c3422582ef3368647f3459b04c4c0b67f8e1ee.tar.gz kolla-f1c3422582ef3368647f3459b04c4c0b67f8e1ee.zip | |
Macro install packages
Simplification of package installations
Change-Id: I78c0a84c55e891dec7c9bd21bc61700dba244526
Partially-implements: blueprint third-party-plugin-support
Diffstat (limited to 'docker')
| -rw-r--r-- | docker/macros.j2 | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/docker/macros.j2 b/docker/macros.j2 new file mode 100644 index 000000000..c10973ef6 --- /dev/null +++ b/docker/macros.j2 @@ -0,0 +1,7 @@ +{% 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 %} |
