Skip to content

Commit

Permalink
Added possibility to configure extra flags
Browse files Browse the repository at this point in the history
  • Loading branch information
UnderGreen committed Sep 22, 2016
1 parent eb7e49e commit 364f63d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,5 @@ prometheus_config_flags:
'web.external-url': '{{ prometheus_web_external_url }}'
'alertmanager.url': '{{ prometheus_alertmanager_url }}'

prometheus_config_flags_extra: {}

2 changes: 1 addition & 1 deletion templates/etc/systemd/system/prometheus.service.j2
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ PIDFile={{ prometheus_pid_path }}
User={{ prometheus_user }}
Group={{ prometheus_group }}
ExecReload=/bin/kill -HUP $MAINPID
ExecStart={{ prometheus_bin_dir }}/prometheus {% for flag, flag_value in prometheus_config_flags.iteritems() %}-{{ flag }}={{ flag_value }} {% endfor %}
ExecStart={{ prometheus_bin_dir }}/prometheus {% for flag, flag_value in prometheus_config_flags.iteritems() %}-{{ flag }}={{ flag_value }} {% endfor %}{% for flag, flag_value in prometheus_config_flags_extra.iteritems() %}-{{ flag }}={{ flag_value }} {% endfor %}

SyslogIdentifier=prometheus
Restart=always
Expand Down

0 comments on commit 364f63d

Please sign in to comment.