add backup_host_id
This commit is contained in:
parent
2bb51ac0b2
commit
5ba16338c6
@ -33,6 +33,7 @@ Role variables
|
|||||||
| pbs_datastore | string | | | mandatory |
|
| pbs_datastore | string | | | mandatory |
|
||||||
| pbs_fingerprint | string | | | mandatory |
|
| pbs_fingerprint | string | | | mandatory |
|
||||||
| pbs_password | string | | | mandatory |
|
| pbs_password | string | | | mandatory |
|
||||||
|
| backup_host_id | string | | | |
|
||||||
| backup_dir | string | | | mandatory |
|
| backup_dir | string | | | mandatory |
|
||||||
| backup_local_retention | string | | | mandatory |
|
| backup_local_retention | string | | | mandatory |
|
||||||
| backup_path_include | dict | | | |
|
| backup_path_include | dict | | | |
|
||||||
|
@ -84,7 +84,7 @@ find $backup_dir -type d -ctime +$backup_local_retention -exec rm -rf {} \;
|
|||||||
|
|
||||||
## send to PBS ##
|
## send to PBS ##
|
||||||
/usr/bin/proxmox-backup-client backup slash.pxar:/ \
|
/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 %}
|
{% if backup_path_include is defined %}
|
||||||
{% for item in backup_path_include %}
|
{% for item in backup_path_include %}
|
||||||
{% if item.fs_mount is defined %}--include-dev {{ item.path }} \{% endif %}
|
{% if item.fs_mount is defined %}--include-dev {{ item.path }} \{% endif %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user