[P1] Reboot task in update_upgrade.yml crashes on non-Debian hosts #2

Closed
opened 2026-03-22 18:04:10 +00:00 by jeet · 0 comments
Owner

Problem

reboot_required_file is only registered on Debian hosts (guarded by when: ansible_os_family == "Debian"). On RedHat/other hosts that task is skipped, so the following reboot task evaluates reboot_required_file.stat.exists on an undefined variable and crashes with a fatal error.

Fix

when: reboot_required_file is defined and reboot_required_file.stat.exists

File: playbooks/update_upgrade.yml

## Problem `reboot_required_file` is only registered on Debian hosts (guarded by `when: ansible_os_family == "Debian"`). On RedHat/other hosts that task is skipped, so the following reboot task evaluates `reboot_required_file.stat.exists` on an undefined variable and crashes with a fatal error. ## Fix ```yaml when: reboot_required_file is defined and reboot_required_file.stat.exists ``` **File:** `playbooks/update_upgrade.yml`
jeet closed this issue 2026-03-22 18:14:21 +00:00
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: jeet/OCI_Build#2