restic: Only set backup hostname if we have ansible fact

For all backup containers.
This commit is contained in:
Marty Oehme 2025-07-19 08:53:51 +02:00
parent 8dafc38a83
commit 6b26ba444b
Signed by: Marty
GPG key ID: 4E535BC19C61886E
4 changed files with 11 additions and 11 deletions

View file

@ -293,7 +293,7 @@ services:
{% if restic_enable is not undefined and not false and arrstack_restic_enable is not undefined and not false %}
backup:
image: mazzolino/restic
hostname: "{{ ansible_hostname }}"
hostname: "{{ ansible_hostname | default() }}"
environment:
TZ: "{{ restic_tz }}"
SKIP_INIT: true