Refactoring + final touches

This commit is contained in:
Francesco Zimbolo
2026-04-24 12:58:56 +00:00
parent 6f6cc10aae
commit d8b60d10e0
16 changed files with 369 additions and 106 deletions

View File

@@ -1,24 +1,35 @@
---
# tasks file for linstor_repo
# Target: Proxmox 9 (Debian 13 / Trixie) with DRBD 9
# linbit_proxmox_version defaults to: Debian major version minus 4
# (Debian 13 = PVE 9, Debian 12 = PVE 8, etc.)
# Override this variable in group_vars if LINBIT releases a new repo name.
- name: Download LINBIT keyring package
ansible.builtin.get_url:
url: https://packages.linbit.com/public/linbit-keyring.deb
dest: /tmp/linbit-keyring.deb
mode: '0644'
check_mode: false
- name: Install LINBIT keyring
ansible.builtin.apt:
deb: /tmp/linbit-keyring.deb
state: present
- name: Add LINBIT APT repository for Proxmox
ansible.builtin.apt_repository:
repo: >-
deb [signed-by=/etc/apt/trusted.gpg.d/linbit-keyring.gpg]
https://packages.linbit.com/public/
proxmox-{{ ansible_facts['distribution_major_version'] | int - 4 }}
drbd-9
filename: linbit
- name: Remove legacy LINBIT .list file (old APT format, prevents duplicates)
ansible.builtin.file:
path: /etc/apt/sources.list.d/linbit.list
state: absent
- name: Add LINBIT APT repository for Proxmox (DEB822 format)
ansible.builtin.deb822_repository:
name: linbit
types: deb
uris: https://packages.linbit.com/public/
suites: "proxmox-{{ linbit_proxmox_version | default(ansible_facts['distribution_major_version'] | int - 4) }}"
components: drbd-9
signed_by: /etc/apt/trusted.gpg.d/linbit-keyring.gpg
state: present
update_cache: true
notify: Update APT cache