From 1e9ad668b6223b9ce49f3e3f21345f89216d790f Mon Sep 17 00:00:00 2001 From: Rene Mewissen Date: Tue, 22 Nov 2022 18:13:08 +0100 Subject: [PATCH] corrected var --- roles/backup/templates/ssh_config.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/backup/templates/ssh_config.j2 b/roles/backup/templates/ssh_config.j2 index ee4baf7..9ac9b2f 100644 --- a/roles/backup/templates/ssh_config.j2 +++ b/roles/backup/templates/ssh_config.j2 @@ -1,4 +1,4 @@ -{% for host in hostvars[inventory_name]['hosts_to_backup'] %} +{% for host in hostvars[inventory_hostname]['hosts_to_backup'] %} Host {{ host.hostname }}_backup Hostname {{ host.fqdn }} User root