Fix post-reboot extra packages task

This commit is contained in:
2026-01-02 15:55:27 +01:00
parent 82a1548b2e
commit 0a76e07b39

View File

@@ -80,12 +80,6 @@
ansible_ssh_extra_args: "-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no" ansible_ssh_extra_args: "-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"
- name: Install post-reboot extra packages - name: Install post-reboot extra packages
when:
- post_reboot_can_connect | bool
- extra_packages is defined
- extra_packages | length > 0
block:
- name: Install extra packages
vars: vars:
post_install_extra_packages: >- post_install_extra_packages: >-
{{ {{
@@ -98,7 +92,11 @@
| reject('equalto', '') | reject('equalto', '')
| list | list
}} }}
when: post_install_extra_packages | length > 0 when:
- post_reboot_can_connect | bool
- extra_packages is defined
- extra_packages | length > 0
- post_install_extra_packages | length > 0
ansible.builtin.package: ansible.builtin.package:
name: "{{ post_install_extra_packages }}" name: "{{ post_install_extra_packages }}"
state: present state: present