fix(bootstrap): detect kernel package name for dnf family reinstall step
This commit is contained in:
@@ -33,7 +33,15 @@
|
||||
register: bootstrap_dnf_extra_result
|
||||
changed_when: bootstrap_dnf_extra_result.rc == 0
|
||||
|
||||
- name: Reinstall kernel core
|
||||
ansible.builtin.command: "{{ chroot_command }} dnf reinstall -y kernel-core"
|
||||
- name: Detect installed kernel package name
|
||||
ansible.builtin.command: "{{ chroot_command }} rpm -q kernel-core"
|
||||
register: bootstrap_dnf_kernel_check
|
||||
changed_when: false
|
||||
failed_when: false
|
||||
|
||||
- name: Reinstall kernel package
|
||||
vars:
|
||||
_kernel_pkg: "{{ 'kernel-core' if bootstrap_dnf_kernel_check.rc == 0 else 'kernel' }}"
|
||||
ansible.builtin.command: "{{ chroot_command }} dnf reinstall -y {{ _kernel_pkg }}"
|
||||
register: bootstrap_dnf_kernel_result
|
||||
changed_when: bootstrap_dnf_kernel_result.rc == 0
|
||||
|
||||
Reference in New Issue
Block a user