From 7a08e8db54ce48eaf2df97fa92876d4d9237c6c7 Mon Sep 17 00:00:00 2001 From: lagooj Date: Mon, 9 Nov 2020 15:25:51 +0100 Subject: [PATCH] feat(archive): use args pillar when using upstream from repo / archive --- prometheus/archive/install.sls | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/prometheus/archive/install.sls b/prometheus/archive/install.sls index 76744cc..19c7534 100644 --- a/prometheus/archive/install.sls +++ b/prometheus/archive/install.sls @@ -115,7 +115,11 @@ prometheus-archive-install-{{ name }}-managed-service: workdir: {{ p.dir.var }}/{{ name }} stop: '' {%- if name in ('node_exporter', 'consul_exporter') or 'config_file' not in p.pkg.component[name] %} - start: {{ p.pkg.component[name]['path'] }}/{{ name }} + {%- set args = [] %} + {%- for param, value in p.pkg.component.get(name).get('service').get('args', {}).items() %} + {% do args.append("--" ~ param ~ "=" ~ value ) %} + {%- endfor %} + start: {{ p.pkg.component[name]['path'] }}/{{ name }} {{ args|join(' ') }} {%- else %} start: {{ p.pkg.component[name]['path'] }}/{{ name }} --config.file {{ p.pkg.component[name]['config_file'] }} # noqa 204 {%- endif %}