From 1cc4ca93f450b586f3b2b3e44119c3a1fa630a1a Mon Sep 17 00:00:00 2001 From: tigattack <10629864+tigattack@users.noreply.github.com> Date: Thu, 17 Oct 2024 14:42:08 +0100 Subject: [PATCH] feat/configure_snapraid: patch `snapraid-btrfs` to work with new versions of snapper See: * https://github.com/automorphism88/snapraid-btrfs/issues/23 * https://github.com/automorphism88/snapraid-btrfs/issues/35 * https://github.com/automorphism88/snapraid-btrfs/pull/34 --- .../tasks/install_snapraid-btrfs.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/roles/configure_snapraid/tasks/install_snapraid-btrfs.yml b/roles/configure_snapraid/tasks/install_snapraid-btrfs.yml index f4cb599..337067b 100644 --- a/roles/configure_snapraid/tasks/install_snapraid-btrfs.yml +++ b/roles/configure_snapraid/tasks/install_snapraid-btrfs.yml @@ -27,3 +27,13 @@ - name: Display snapraid-btrfs output ansible.builtin.debug: var: snapraid_btrfs_output.stdout_lines + +# TODO: Remove this once the following PR is merged https://github.com/automorphism88/snapraid-btrfs/pull/34 +- name: Patch snapraid-btrfs + ansible.builtin.lineinfile: + path: /usr/local/bin/snapraid-btrfs + regexp: >- + ^(\s{8})sed -e '/\^SUBVOLUME /!d' -e 's/\^SUBVOLUME\[ ]\*\| //'\)\"$ + line: >- + \1sed -e '/^SUBVOLUME /!d' -e 's/^SUBVOLUME[ ]*[|│] //')" + backrefs: true