Skip to content

Commit ab51977

Browse files
Merge pull request #1058 from slagle/boot-file-entry-present-is-defined
Check if boot_file_entry_present is defined before using it
2 parents 98e1a95 + 383b992 commit ab51977

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

roles/edpm_kernel/tasks/kernelargs.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@
136136
when:
137137
- set_kernel_args is defined
138138
- set_kernel_args is true
139-
- ansible_local.bootc
139+
- ansible_local.bootc is defined and ansible_local.bootc
140140
block:
141141

142142
- name: Check if the kernelargs entry is already present in the file
@@ -213,10 +213,10 @@
213213
- name: Reboot tasks
214214
ansible.builtin.include_tasks: reboot.yaml
215215
when:
216-
- not boot_file_entry_present
216+
- boot_file_entry_present is defined and not boot_file_entry_present
217217

218218
- name: Skipping reboot for deployed node
219219
ansible.builtin.debug: # noqa: no-handler
220220
msg: "Reboot is skipped for kernel arg change, user has to plan the reboot with migration and downtime"
221221
when:
222-
- boot_file_entry_present
222+
- boot_file_entry_present is defined and boot_file_entry_present

0 commit comments

Comments
 (0)