---
- hosts: imaging_v2
  remote_user: zoox
  tasks:
  - name: Create directory for reset flag
    file:
      path=/overlay/deploy/initrd
      state=directory
    become: yes
    tags:
      - reset_image_restart
  - name: Create reset flag
    copy:
      content=""
      dest=/overlay/deploy/initrd/reset
    become: yes
    tags:
      - reset_image_restart
  - name: Reboot the system
    reboot:
      reboot_timeout=400
    become: yes
    tags:
      - reset_image_restart
