- name: Reset number of reboots
  ansible.builtin.set_fact:
    file_wait_reboots_left: '{{ file_wait_reboots }}'

- name: Check if file exists
  ansible.builtin.include_tasks: check.yml

- name: Fail unless file exists
  ansible.builtin.fail:
    msg: 'File is missing: {{ file_wait_path }}'
  when: file_wait_check is not defined or file_wait_check is not succeeded or file_wait_check is unreachable