Fix bootstrap package list rendering

This commit is contained in:
2025-12-28 00:12:37 +01:00
parent ae4fb6f43c
commit e1db2ce434
8 changed files with 485 additions and 646 deletions

View File

@@ -3,9 +3,8 @@
vars: vars:
bootstrap_alma_extra: >- bootstrap_alma_extra: >-
{{ {{
(
lookup('vars', bootstrap_var_key) lookup('vars', bootstrap_var_key)
) | reject('equalto', '')
| join(' ') | join(' ')
}} }}
ansible.builtin.command: "{{ item }}" ansible.builtin.command: "{{ item }}"

View File

@@ -6,6 +6,6 @@
lookup('vars', bootstrap_var_key) lookup('vars', bootstrap_var_key)
}} }}
ansible.builtin.command: >- ansible.builtin.command: >-
pacstrap /mnt {{ bootstrap_archlinux_packages | join(' ') }} --asexplicit pacstrap /mnt {{ bootstrap_archlinux_packages | reject('equalto', '') | join(' ') }} --asexplicit
register: bootstrap_result register: bootstrap_result
changed_when: bootstrap_result.rc == 0 changed_when: bootstrap_result.rc == 0

View File

@@ -9,12 +9,13 @@
}} }}
bootstrap_debian_base_list: "{{ lookup('vars', bootstrap_var_key).base | default([]) }}" bootstrap_debian_base_list: "{{ lookup('vars', bootstrap_var_key).base | default([]) }}"
bootstrap_debian_extra_list: "{{ lookup('vars', bootstrap_var_key).extra | default([]) }}" bootstrap_debian_extra_list: "{{ lookup('vars', bootstrap_var_key).extra | default([]) }}"
bootstrap_debian_base: "{{ bootstrap_debian_base_list | join(',') }}" bootstrap_debian_base: "{{ bootstrap_debian_base_list | reject('equalto', '') | join(',') }}"
bootstrap_debian_extra: >- bootstrap_debian_extra: >-
{{ {{
( (
bootstrap_debian_extra_list bootstrap_debian_extra_list
) )
| reject('equalto', '')
| join(' ') | join(' ')
}} }}
ansible.builtin.command: "{{ item }}" ansible.builtin.command: "{{ item }}"

View File

@@ -3,9 +3,8 @@
vars: vars:
bootstrap_fedora_extra: >- bootstrap_fedora_extra: >-
{{ {{
(
lookup('vars', bootstrap_var_key) lookup('vars', bootstrap_var_key)
) | reject('equalto', '')
| join(' ') | join(' ')
}} }}
ansible.builtin.command: "{{ item }}" ansible.builtin.command: "{{ item }}"

View File

@@ -55,9 +55,8 @@
bootstrap_rhel_release: "{{ bootstrap_os_key | replace('rhel', '') }}" bootstrap_rhel_release: "{{ bootstrap_os_key | replace('rhel', '') }}"
bootstrap_rhel_extra: >- bootstrap_rhel_extra: >-
{{ {{
(
lookup('vars', bootstrap_var_key) lookup('vars', bootstrap_var_key)
) | reject('equalto', '')
| join(' ') | join(' ')
}} }}
ansible.builtin.command: >- ansible.builtin.command: >-

View File

@@ -3,9 +3,8 @@
vars: vars:
bootstrap_rocky_extra: >- bootstrap_rocky_extra: >-
{{ {{
(
lookup('vars', bootstrap_var_key) lookup('vars', bootstrap_var_key)
) | reject('equalto', '')
| join(' ') | join(' ')
}} }}
ansible.builtin.command: "{{ item }}" ansible.builtin.command: "{{ item }}"

View File

@@ -5,12 +5,13 @@
{{ 'plucky' if bootstrap_os_key == 'ubuntu' else 'noble' }} {{ 'plucky' if bootstrap_os_key == 'ubuntu' else 'noble' }}
bootstrap_ubuntu_base_list: "{{ lookup('vars', bootstrap_var_key).base | default([]) }}" bootstrap_ubuntu_base_list: "{{ lookup('vars', bootstrap_var_key).base | default([]) }}"
bootstrap_ubuntu_extra_list: "{{ lookup('vars', bootstrap_var_key).extra | default([]) }}" bootstrap_ubuntu_extra_list: "{{ lookup('vars', bootstrap_var_key).extra | default([]) }}"
bootstrap_ubuntu_base: "{{ bootstrap_ubuntu_base_list | join(',') }}" bootstrap_ubuntu_base: "{{ bootstrap_ubuntu_base_list | reject('equalto', '') | join(',') }}"
bootstrap_ubuntu_extra: >- bootstrap_ubuntu_extra: >-
{{ {{
( (
bootstrap_ubuntu_extra_list bootstrap_ubuntu_extra_list
) )
| reject('equalto', '')
| join(' ') | join(' ')
}} }}
ansible.builtin.command: "{{ item }}" ansible.builtin.command: "{{ item }}"

File diff suppressed because it is too large Load Diff