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