From cb425a55821d6c34301fa434ecd4b7a795bf9ffc Mon Sep 17 00:00:00 2001 From: Christian Elberfeld <6413499+elberfeld@users.noreply.github.com> Date: Fri, 19 Apr 2024 10:49:18 +0200 Subject: [PATCH] Watchtower notification template --- common/docker_watchtower/templates/docker-compose.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/common/docker_watchtower/templates/docker-compose.yml b/common/docker_watchtower/templates/docker-compose.yml index deb5d676..6c689a4b 100644 --- a/common/docker_watchtower/templates/docker-compose.yml +++ b/common/docker_watchtower/templates/docker-compose.yml @@ -18,11 +18,11 @@ services: WATCHTOWER_NOTIFICATION_REPORT: "true" WATCHTOWER_NOTIFICATION_URL: > matrix://:{{ matrix_notification_access_token }}@{{ matrix.domain }}/?rooms={{ matrix.notifications_room_id }} - WATCHTOWER_NOTIFICATION_TEMPLATE: | + WATCHTOWER_NOTIFICATION_TEMPLATE: | {% raw %} {{- if .Report -}} {{- with .Report -}} {{- if ( or .Updated .Failed ) -}} - Watchtower @ webserver2 {{"\n"}} + {% endraw %}Watchtower @ {{ inventory_hostname }} {%raw %} {{"\n"}} {{len .Scanned}} Scanned, {{len .Updated}} Updated, {{len .Failed}} Failed {{- range .Updated}} - {{.Name}} ({{.ImageName}}): {{.CurrentImageID.ShortID}} updated to {{.LatestImageID.ShortID}} @@ -36,6 +36,7 @@ services: {{- end -}} {{- end -}} {{- end -}} + {% endraw %} -- GitLab