Skip to content

Commit 7244daf

Browse files
denvoljrichm
authored andcommitted
Fix key receiving + refactor
1 parent caecf7a commit 7244daf

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

tasks/main-blivet.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
11
---
2+
23
- name: Add blivet package repository
3-
when: ansible_facts['os_family'] == "Debian"
4+
when:
5+
- _blivet_custom_repo.key is defined
6+
- _blivet_custom_repo.key_name is defined
7+
- _blivet_custom_repo.repository is defined
48
block:
59
- name: Add repo key
6-
ansible.builtin.command:
7-
cmd: "wget https://download.opensuse.org/repositories/home:vtrefny/Debian_Unstable/Release.key -O /etc/apt/trusted.gpg.d/home_vtrefny.asc"
10+
ansible.builtin.get_url:
11+
url: "{{ _blivet_custom_repo.key }}"
12+
dest: "/etc/apt/trusted.gpg.d/{{ _blivet_custom_repo.key_name }}"
13+
mode: "0644"
814

915
- name: Add blivet repo
1016
ansible.builtin.apt_repository:
11-
repo: "deb http://download.opensuse.org/repositories/home:/vtrefny/Debian_Unstable/ /"
17+
repo: "{{ _blivet_custom_repo.repository }}"
1218
state: present
1319

1420
- name: Make sure blivet is available

vars/Debian_13.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
---
2+
_blivet_custom_repo:
3+
# Debian has no blivet lib in repos
4+
# See: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=965321
5+
repository: "deb https://download.opensuse.org/repositories/home:/vtrefny/Debian_13/ /"
6+
key: "https://download.opensuse.org/repositories/home:vtrefny/Debian_13/Release.key"
7+
key_name: home_vtrefny.asc
8+
29
blivet_package_list:
310
- python3-blivet
411
- libblockdev-crypto3

0 commit comments

Comments
 (0)