From dd4fe190d0b7a92c72565091c99baba5b4ec6f4f Mon Sep 17 00:00:00 2001 From: Martin Mágr Date: Tue, 17 Oct 2017 13:52:44 +0200 Subject: Clean fluentd_plugins_install block fluentd_plugins_install should contain only plugin installation operations, so that the override does not have to handle irrelevant operations Change-Id: I8f810d194a1e638683df1f445c187b8d98629730 --- docker/macros.j2 | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'docker/macros.j2') diff --git a/docker/macros.j2 b/docker/macros.j2 index 5294ddacf..dfb85447b 100644 --- a/docker/macros.j2 +++ b/docker/macros.j2 @@ -80,3 +80,14 @@ RUN apt-get update \ RUN curl -o /usr/bin/kubectl http://storage.googleapis.com/kubernetes-release/release/v1.5.4/bin/linux/${KUBE_ARCH}/kubectl \ && chmod 755 /usr/bin/kubectl {% endmacro %} + + +{% macro install_fluent_plugins(plugins) -%} +{% if plugins is defined and plugins|length > 0 -%} + {% if base_distro in ['centos', 'oraclelinux', 'rhel'] -%} + RUN ulimit -n 65536 && gem install --minimal-deps {{ plugins | join(' ') }} + {%- elif base_distro in ['debian', 'ubuntu'] -%} + RUN ulimit -n 65536 && td-agent-gem install {{ plugins | join(' ') }} + {%- endif %} +{%- endif %} +{%- endmacro %} -- cgit v1.2.3