refactor(bootstrap): standardize patterns, extract common logic, remove dead code

This commit is contained in:
2026-02-12 23:14:17 +01:00
parent 8f8ce341ae
commit debd1e176f
16 changed files with 122 additions and 461 deletions

View File

@@ -163,7 +163,7 @@
- name: Setup Pacman
when:
- not (custom_iso | bool)
- item.os is not defined or (os_resolved | default(os)) in item.os
- item.os is not defined or os in item.os
community.general.pacman:
update_cache: true
force: true
@@ -171,9 +171,9 @@
state: latest
loop:
- { name: glibc }
- { name: dnf, os: [almalinux8, almalinux9, almalinux10, fedora40, fedora41, fedora42, fedora43, rhel8, rhel9, rhel10, rocky8, rocky9, rocky10] }
- { name: debootstrap, os: [debian10, debian11, debian12, debian13, debianunstable, ubuntu, ubuntu-lts] }
- { name: debian-archive-keyring, os: [debian10, debian11, debian12, debian13, debianunstable] }
- { name: dnf, os: [almalinux, fedora, rhel, rocky] }
- { name: debootstrap, os: [debian, ubuntu, ubuntu-lts] }
- { name: debian-archive-keyring, os: [debian] }
- { name: ubuntu-keyring, os: [ubuntu, ubuntu-lts] }
retries: 4
delay: 15
@@ -210,12 +210,7 @@
block:
- name: Select repository template
ansible.builtin.set_fact:
environment_repo_template: >-
{{
(os_resolved | default(os)) | lower
if os == 'rhel'
else os | lower
}}
environment_repo_template: "{{ os | lower }}"
changed_when: false
- name: Create directories for repository files and RPM GPG keys