This commit is contained in:
2025-10-22 22:56:30 +03:00
parent 800296fac8
commit f595f38355

View File

@@ -484,14 +484,13 @@
# ---------------------------- Normalize rebootin early (HOURS) ----------------------------
# Accept: "", "now", "immediate", numeric (4), numeric string ("4"), or "4h"
- name: Normalize rebootin detect now or integer HOURS
- name: Normalize rebootin (strict hours → seconds/minutes)
delegate_to: localhost
ansible.builtin.set_fact:
# treat rebootin as hours; consumer always passes a number (e.g., 4)
_reboot_raw: "{{ rebootin | default('') | string | trim }}"
_reboot_is_now: false
_reboot_is_int: "{{ (_reboot_raw | length) > 0 }}"
_reboot_hours: "{{ rebootin | int }}"
reboot_hours: "{{ rebootin | int }}"
reboot_requested: true
reboot_seconds: "{{ (rebootin | int) * 3600 + 20 }}"
reboot_minutes: "{{ (rebootin | int) * 60 }}"
- name: Debug reboot normalization detail
delegate_to: localhost