hostvars not needed anymore for backup

This commit is contained in:
2025-04-10 10:24:18 +02:00
parent 83568ba719
commit 89f5dcefa8
2 changed files with 1 additions and 2 deletions

View File

@@ -1,4 +1,3 @@
{#{% for host in hostvars[inventory_hostname]['hosts_to_backup'] %}#}
{% for host in 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 {{ host.hostname }};/opt/backup/config/{{ host.hostname }}_includes.txt;/opt/backup/config/{{ host.hostname }}_excludes.txt
{% endfor %} {% endfor %}

View File

@@ -1,4 +1,4 @@
{% for host in hostvars[inventory_hostname]['hosts_to_backup'] %} {% for host in hosts_to_backup %}
Host {{ host.hostname }}_backup Host {{ host.hostname }}_backup
Hostname {{ host.ip | default(host.fqdn) }} Hostname {{ host.ip | default(host.fqdn) }}
User root User root