Skip to content

Commit f33119e

Browse files
committed
defaults,templates: wrap notification template in raw block to stop confusing jinja
1 parent f9f07ff commit f33119e

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

defaults/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ alertmanager_irc_relay_irc_nickname_password: ""
1414
alertmanager_irc_relay_irc_realname: ""
1515

1616
alertmanager_irc_relay_notice_once_per_alert_group: "yes"
17-
alertmanager_irc_relay_notice_template: "Alert {{ .Labels.alertname }} on {{ .Labels.instance }} is {{ .Status }}"
17+
alertmanager_irc_relay_notice_template: "{% raw %}Alert {{ .Labels.alertname }} on {{ .Labels.instance }} is {{ .Status }}{% endraw %}"

templates/alertmanager-irc-relay-config.yml.j2

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ notice_once_per_alert_group: {{ alertmanager_irc_relay_notice_once_per_alert_gro
3434
# Define how IRC messages should be formatted.
3535
#
3636
# The formatting is based on golang's text/template.
37-
notice_template: {{ alertmanager_irc_relay_notice_template }}
37+
notice_template: {{ alertmanager_irc_relay_notice_template }}
3838
# Note: When sending only one notice per alert group the default
3939
# notice_template is set to
40-
# "Alert {{ .GroupLabels.alertname }} for {{ .GroupLabels.job }} is {{ .Status }}"
41-
40+
# "Alert {% raw %}{{ .GroupLabels.alertname }} for {{ .GroupLabels.job }} is {{ .Status }}{% endraw %}"

0 commit comments

Comments
 (0)