From 5ba16338c6e291fe281384f6c481f29233836830 Mon Sep 17 00:00:00 2001 From: Ludovic Cartier Date: Tue, 24 Dec 2024 15:33:59 +0100 Subject: [PATCH] add backup_host_id --- README.md | 1 + templates/brain_backup.j2 | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index cecd771..a7d01e2 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,7 @@ Role variables | pbs_datastore | string | | | mandatory | | pbs_fingerprint | string | | | mandatory | | pbs_password | string | | | mandatory | +| backup_host_id | string | | | | | backup_dir | string | | | mandatory | | backup_local_retention | string | | | mandatory | | backup_path_include | dict | | | | diff --git a/templates/brain_backup.j2 b/templates/brain_backup.j2 index e670a64..16facf8 100644 --- a/templates/brain_backup.j2 +++ b/templates/brain_backup.j2 @@ -84,7 +84,7 @@ 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 {{ ansible_hostname }} \ +--backup-id {{ backup_host_id | default({{ ansible_hostname }}) }} \ {% if backup_path_include is defined %} {% for item in backup_path_include %} {% if item.fs_mount is defined %}--include-dev {{ item.path }} \{% endif %}