From 89f5dcefa8541da72ed479262d786eadce1c9420 Mon Sep 17 00:00:00 2001 From: Rene Mewissen Date: Thu, 10 Apr 2025 10:24:18 +0200 Subject: [PATCH] hostvars not needed anymore for backup --- roles/backup/templates/backup_remote.j2 | 1 - roles/backup/templates/ssh_config.j2 | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/roles/backup/templates/backup_remote.j2 b/roles/backup/templates/backup_remote.j2 index ccbc374..e8d40e1 100644 --- a/roles/backup/templates/backup_remote.j2 +++ b/roles/backup/templates/backup_remote.j2 @@ -1,4 +1,3 @@ -{#{% for host in hostvars[inventory_hostname]['hosts_to_backup'] %}#} {% for host in hosts_to_backup %} {{ host.hostname }};/opt/backup/config/{{ host.hostname }}_includes.txt;/opt/backup/config/{{ host.hostname }}_excludes.txt {% endfor %} \ No newline at end of file diff --git a/roles/backup/templates/ssh_config.j2 b/roles/backup/templates/ssh_config.j2 index a8a29a8..435a56f 100644 --- a/roles/backup/templates/ssh_config.j2 +++ b/roles/backup/templates/ssh_config.j2 @@ -1,4 +1,4 @@ -{% for host in hostvars[inventory_hostname]['hosts_to_backup'] %} +{% for host in hosts_to_backup %} Host {{ host.hostname }}_backup Hostname {{ host.ip | default(host.fqdn) }} User root