18 lines
592 B
YAML

---
- name: Capture initial boot ID
ansible.builtin.slurp:
src: "{{ verified_reboot_bootid_file }}"
register: verified_reboot_pre_boot_id_raw
- name: Set pre-reboot boot ID
ansible.builtin.set_fact:
verified_reboot_pre_boot_id: "{{ verified_reboot_pre_boot_id_raw['content'] | b64decode | trim }}"
verified_reboot_check_count: 0
- name: Reboot the host
ansible.builtin.command:
cmd: "/usr/sbin/shutdown -r +{{ verified_reboot_reboot_time }} '{{ verified_reboot_reboot_msg }}'"
- name: Verify reboot status of host
ansible.builtin.include_tasks: check_boot_id.yml