borg-backup: disambiguate for multiple servers

The ssh config and cron job will overwrite each other when we have
multiple backup servers.

Ensure the markers are different.

Change-Id: I1736fa9c72c90a357b2229bc86c33b33a2bb321c
This commit is contained in:
Ian Wienand 2020-11-04 13:11:43 +11:00
parent 5df9b9bcf6
commit d9d9a53cb7

View File

@ -33,7 +33,7 @@
IdentityFile /root/.ssh/id_borg_backup_ed25519
User {{ borg_username }}
mode: 0600
marker: '# {mark} ANSIBLE MANAGED BLOCK borg-backup'
marker: '# {mark} ANSIBLE MANAGED BLOCK borg-backup {{ item }}'
with_inventory_hostnames: borg-backup-server
- name: Generate borg_user info tuple
@ -49,7 +49,7 @@
- name: Install backup cron job
cron:
name: "Run borg backup"
name: "Run borg backup to {{ item }}"
job: "/usr/local/bin/borg-backup {{ item }} 2>> /var/log/borg-backup-{{ item }}.log"
user: root
hour: '5'