2256
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user