refactor(bootstrap): restructure package lists to self-contained per-OS dicts with base/extra/conditional

This commit is contained in:
2026-02-21 02:39:06 +01:00
parent e5bd152fb3
commit a76f317f8f
8 changed files with 425 additions and 227 deletions

View File

@@ -1,11 +1,14 @@
---
- name: Bootstrap ArchLinux
vars:
_config: "{{ lookup('vars', bootstrap_var_key) }}"
bootstrap_archlinux_packages: >-
{{
lookup('vars', bootstrap_var_key)
((_config.base | default([])) + (_config.conditional | default([])))
| reject('equalto', '')
| list
}}
ansible.builtin.command: >-
pacstrap /mnt {{ bootstrap_archlinux_packages | reject('equalto', '') | join(' ') }} --asexplicit
pacstrap /mnt {{ bootstrap_archlinux_packages | join(' ') }} --asexplicit
register: bootstrap_result
changed_when: bootstrap_result.rc == 0