From b171d58e4c9f2579a902c1ffd902c474b490cf41 Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO <ynerant@crans.org> Date: Tue, 23 Feb 2021 14:31:31 +0100 Subject: [PATCH] [borg] Don't bin borgbackup from bullseye if we are already under bullseye Signed-off-by: Yohann D'ANELLO <ynerant@crans.org> --- roles/borgbackup-client/tasks/main.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/roles/borgbackup-client/tasks/main.yml b/roles/borgbackup-client/tasks/main.yml index 0e195fc0..25b8ea0d 100644 --- a/roles/borgbackup-client/tasks/main.yml +++ b/roles/borgbackup-client/tasks/main.yml @@ -11,6 +11,17 @@ - ansible_distribution_major_version | int <= 10 - ansible_distribution_release != "bullseye" +- name: Don't pin borgmatic if we are on bullseye + file: + path: "/etc/apt/{{ item }}" + state: absent + loop: + - sources.list.d/bullseye.list + - preferences.d/borgmatic-bullseye + when: + - ansible_distribution == "Debian" + - ansible_distribution_release == "bullseye" + - name: Install borgbackup apt: update_cache: true -- GitLab