Skip to content
This repository has been archived by the owner on Mar 6, 2023. It is now read-only.

bump version to 0.13.0; support newer version in systemd #18

Merged
merged 1 commit into from
Jan 26, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---

alertmanager_version: 0.12.0
alertmanager_version: 0.13.0

alertmanager_root_dir: /opt/alertmanager
alertmanager_config_dir: /etc/alertmanager
Expand Down
16 changes: 11 additions & 5 deletions templates/alertmanager.service.j2
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
{%- if alertmanager_version | version_compare('0.13.0', '>=') %}
{%- set pre = '-' %}
{%- else %}
{%- set pre = '' %}
{%- endif %}
# {{ ansible_managed }}
[Unit]
Description=Prometheus Alertmanager
After=network.target
Expand All @@ -9,11 +15,11 @@ User=alertmanager
Group=alertmanager
ExecReload=/bin/kill -HUP $MAINPID
ExecStart={{ alertmanager_root_dir }}/alertmanager \
-config.file={{ alertmanager_config_dir }}/alertmanager.yml \
-storage.path={{ alertmanager_db_dir }} \
-web.listen-address={{ alertmanager_listen_address }} \
-web.external-url={{ alertmanager_external_url }}{% for flag, flag_value in alertmanager_cli_flags.iteritems() %} \
-{{ flag }}={{ flag_value }}{% endfor %}
{{ pre }}-config.file={{ alertmanager_config_dir }}/alertmanager.yml \
{{ pre }}-storage.path={{ alertmanager_db_dir }} \
{{ pre }}-web.listen-address={{ alertmanager_listen_address }} \
{{ pre }}-web.external-url={{ alertmanager_external_url }}{% for flag, flag_value in alertmanager_cli_flags.iteritems() %} \
{{ pre }}-{{ flag }}={{ flag_value }}{% endfor %}

SyslogIdentifier=alertmanager
Restart=always
Expand Down