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