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 %}