From d9d9a53cb779d23da8c5c075b53fd7f03e0f30c2 Mon Sep 17 00:00:00 2001 From: Ian Wienand Date: Wed, 4 Nov 2020 13:11:43 +1100 Subject: [PATCH] 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 --- playbooks/roles/borg-backup/tasks/main.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/playbooks/roles/borg-backup/tasks/main.yaml b/playbooks/roles/borg-backup/tasks/main.yaml index ac452fb900..15bbe1dd75 100644 --- a/playbooks/roles/borg-backup/tasks/main.yaml +++ b/playbooks/roles/borg-backup/tasks/main.yaml @@ -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'