From 54b917be58a0f0173d18fe8b0b71c49f26fc941f Mon Sep 17 00:00:00 2001 From: boecspecops Date: Thu, 12 Mar 2026 19:50:34 +0700 Subject: [PATCH 1/2] Added support for debian 13 --- tasks/main-blivet.yml | 13 +++++++++++++ vars/Debian_13.yml | 10 ++++++++++ 2 files changed, 23 insertions(+) create mode 100644 vars/Debian_13.yml diff --git a/tasks/main-blivet.yml b/tasks/main-blivet.yml index 6339c970..c0a77778 100644 --- a/tasks/main-blivet.yml +++ b/tasks/main-blivet.yml @@ -1,4 +1,16 @@ --- +- name: Add blivet package repository + when: ansible_facts['os_family'] == "Debian" + block: + - name: Add repo key + ansible.builtin.command: + cmd: "wget https://download.opensuse.org/repositories/home:vtrefny/Debian_Unstable/Release.key -O /etc/apt/trusted.gpg.d/home_vtrefny.asc" + + - name: Add blivet repo + ansible.builtin.apt_repository: + repo: "deb http://download.opensuse.org/repositories/home:/vtrefny/Debian_Unstable/ /" + state: present + - name: Make sure blivet is available package: name: "{{ blivet_package_list }}" @@ -67,6 +79,7 @@ storage_cryptsetup_services: "{{ ansible_facts.services.values() | selectattr('name', 'defined') | + selectattr('status', 'defined') | rejectattr('status', 'match', '^not-found$') | rejectattr('status', 'match', '^masked$') | rejectattr('status', 'match', '^failed$') | diff --git a/vars/Debian_13.yml b/vars/Debian_13.yml new file mode 100644 index 00000000..7107c8b9 --- /dev/null +++ b/vars/Debian_13.yml @@ -0,0 +1,10 @@ +--- +blivet_package_list: + - python3-blivet + - libblockdev-crypto3 + - libblockdev-dm3 + - libblockdev-fs3 + - libblockdev-lvm3 + - libblockdev-mdraid3 + - libblockdev-swap3 + - mdadm From 7caf366b8b68662e8a1b08bfecd7093c84de7e1b Mon Sep 17 00:00:00 2001 From: boecspecops Date: Thu, 12 Mar 2026 23:48:12 +0700 Subject: [PATCH 2/2] Fix key receiving + refactor --- tasks/main-blivet.yml | 14 ++++++++++---- vars/Debian_13.yml | 7 +++++++ 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/tasks/main-blivet.yml b/tasks/main-blivet.yml index c0a77778..3c2f4c1f 100644 --- a/tasks/main-blivet.yml +++ b/tasks/main-blivet.yml @@ -1,14 +1,20 @@ --- + - name: Add blivet package repository - when: ansible_facts['os_family'] == "Debian" + when: + - _blivet_custom_repo.key is defined + - _blivet_custom_repo.key_name is defined + - _blivet_custom_repo.repository is defined block: - name: Add repo key - ansible.builtin.command: - cmd: "wget https://download.opensuse.org/repositories/home:vtrefny/Debian_Unstable/Release.key -O /etc/apt/trusted.gpg.d/home_vtrefny.asc" + ansible.builtin.get_url: + url: "{{ _blivet_custom_repo.key }}" + dest: "/etc/apt/trusted.gpg.d/{{ _blivet_custom_repo.key_name }}" + mode: "0644" - name: Add blivet repo ansible.builtin.apt_repository: - repo: "deb http://download.opensuse.org/repositories/home:/vtrefny/Debian_Unstable/ /" + repo: "{{ _blivet_custom_repo.repository }}" state: present - name: Make sure blivet is available diff --git a/vars/Debian_13.yml b/vars/Debian_13.yml index 7107c8b9..95a67012 100644 --- a/vars/Debian_13.yml +++ b/vars/Debian_13.yml @@ -1,4 +1,11 @@ --- +_blivet_custom_repo: + # Debian has no blivet lib in repos + # See: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=965321 + repository: "deb https://download.opensuse.org/repositories/home:/vtrefny/Debian_13/ /" + key: "https://download.opensuse.org/repositories/home:vtrefny/Debian_13/Release.key" + key_name: home_vtrefny.asc + blivet_package_list: - python3-blivet - libblockdev-crypto3