refactor(bootstrap): standardize patterns, extract common logic, remove dead code
- Make timezone, locale, and keymap configurable via system_cfg - Consolidate rhel8/9/10.repo.j2 into single rhel.repo.j2 template - Extract bootstrap_common_conditional for shared firewall/LUKS/guest packages - Remove redundant version aliases (fedora40-43, debian10-13, rhel8-10, etc.) - Simplify bootstrap dispatch from 10 conditional blocks to single mapping - Merge bootstrap_ubuntu_lts into bootstrap_ubuntu (identical) - Remove orphaned firstrun.sh.j2 template - Remove configuration/defaults/main.yml aliases, inline into banner.yml - Remove unnecessary changed_when: false on set_fact/debug tasks - Deduplicate hostname variable computation in locales.yml - Update README with timezone/locale/keymap variable reference Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user