refactor(bootstrap): restructure package lists to self-contained per-OS dicts with base/extra/conditional
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user