diff --git a/files/ansible-playbooks/update-indoor.yml b/files/ansible-playbooks/update-indoor.yml index eeef166..dcfd45c 100644 --- a/files/ansible-playbooks/update-indoor.yml +++ b/files/ansible-playbooks/update-indoor.yml @@ -492,11 +492,13 @@ _reboot_is_int: "{{ (rebootin | default('') | string | trim) is match('^\\d+$') }}" _reboot_hours: >- {{ - 0 if _reboot_is_now - else (rebootin | int if _reboot_is_int else -1) + 0 + if ((rebootin | default('') | string | trim | lower) in ['', 'now', 'immediate']) + else (rebootin | int if ((rebootin | default('') | string | trim) is match('^\\d+$')) else -1) }} + - name: Debug reboot normalization detail delegate_to: localhost ansible.builtin.debug: