summaryrefslogtreecommitdiffstats
path: root/test/integration/targets/reboot/tasks/check_reboot.yml
blob: 059c422a35cf9fa6b6d0ddbb028d310403ea2699 (plain)
1
2
3
4
5
6
7
8
9
10
- name: Get current boot time
  command: "{{ _boot_time_command[ansible_facts['distribution'] | lower] | default('cat /proc/sys/kernel/random/boot_id') }}"
  register: after_boot_time

- name: Ensure system was actually rebooted
  assert:
    that:
      - reboot_result is changed
      - reboot_result.elapsed > 10
      - before_boot_time.stdout != after_boot_time.stdout