Merge pull request #55 from corey-hammerton/systemd-params-null
feat(archive): allow command line arguments without values in archive.install
This commit is contained in:
commit
7c69be2077
@ -97,6 +97,7 @@ prometheus:
|
||||
service:
|
||||
name: prometheus-node-exporter
|
||||
args:
|
||||
collector.systemd: null
|
||||
web.listen-address: ":9110"
|
||||
# collector.textfile.directory: /var/tmp/node_exporter
|
||||
|
||||
|
@ -132,7 +132,11 @@ prometheus-archive-install-{{ name }}-managed-service:
|
||||
{%- if name in ('node_exporter', 'consul_exporter') or 'config_file' not in p.pkg.component[name] %}
|
||||
{%- set args = [] %}
|
||||
{%- for param, value in p.pkg.component.get(name).get('service').get('args', {}).items() %}
|
||||
{% do args.append("--" ~ param ~ "=" ~ value ) %}
|
||||
{%- if value is not none %}
|
||||
{% do args.append("--" ~ param ~ "=" ~ value ) %}
|
||||
{%- else %}
|
||||
{% do args.append("--" ~ param ) %}
|
||||
{%- endif %}
|
||||
{%- endfor %}
|
||||
start: {{ p.pkg.component[name]['path'] }}/{{ name }} {{ args|join(' ') }}
|
||||
{%- else %}
|
||||
|
@ -87,6 +87,7 @@ prometheus:
|
||||
node_exporter:
|
||||
service:
|
||||
args:
|
||||
collector.systemd: null
|
||||
web.listen-address: ":9110"
|
||||
# collector.textfile.directory: /var/tmp/node_exporter
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user