template brain_backup - add condition for backup_id

This commit is contained in:
Ludovic Cartier 2024-12-24 15:50:32 +01:00
parent 5ba16338c6
commit 0ef6ae2bac

View File

@ -84,7 +84,9 @@ find $backup_dir -type d -ctime +$backup_local_retention -exec rm -rf {} \;
## send to PBS ##
/usr/bin/proxmox-backup-client backup slash.pxar:/ \
--backup-id {{ backup_host_id | default({{ ansible_hostname }}) }} \
{% if backup_host_id is defined %}
--backup-id {{ backup_host_id }} \
{% endif %}
{% if backup_path_include is defined %}
{% for item in backup_path_include %}
{% if item.fs_mount is defined %}--include-dev {{ item.path }} \{% endif %}