diff --git a/common/docker_watchtower/templates/docker-compose.yml b/common/docker_watchtower/templates/docker-compose.yml index 74e6864334ca7c80034ed9278e747a66b4101657..deb5d676654d3a2de8250561125818930d01297d 100644 --- a/common/docker_watchtower/templates/docker-compose.yml +++ b/common/docker_watchtower/templates/docker-compose.yml @@ -19,27 +19,24 @@ services: WATCHTOWER_NOTIFICATION_URL: > matrix://:{{ matrix_notification_access_token }}@{{ matrix.domain }}/?rooms={{ matrix.notifications_room_id }} WATCHTOWER_NOTIFICATION_TEMPLATE: | - Watchtower @ {{ inventory_hostname }} {% raw %} {{"\n"}} {{- if .Report -}} {{- with .Report -}} + {{- if ( or .Updated .Failed ) -}} + Watchtower @ webserver2 {{"\n"}} {{len .Scanned}} Scanned, {{len .Updated}} Updated, {{len .Failed}} Failed {{- range .Updated}} - {{.Name}} ({{.ImageName}}): {{.CurrentImageID.ShortID}} updated to {{.LatestImageID.ShortID}} {{- end -}} - {{- range .Fresh}} - - {{.Name}} ({{.ImageName}}): {{.State}} - {{- end -}} - {{- range .Skipped}} + {{- range .Skipped}} - {{.Name}} ({{.ImageName}}): {{.State}}: {{.Error}} - {{- end -}} - {{- range .Failed}} + {{- end -}} + {{- range .Failed}} - {{.Name}} ({{.ImageName}}): {{.State}}: {{.Error}} + {{- end -}} {{- end -}} {{- end -}} - {{- else -}} - {{range .Entries -}}{{.Message}}{{"\n"}}{{- end -}} {{- end -}} - {% endraw %} +