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