#!/usr/bin/env bash

# Gather the ignition file needed to install
echo "Getting ignition file"
curl -o /opt/ignition.json http://images.gobeline.com/02-ignition.json

# Run the install to deploy to the first detected hard disk
echo "Running flatcar installer"
sudo flatcar-install -s -e 7 -i /opt/ignition.json -C stable -u
# Reboot the server
echo "rebooting server"
sudo reboot
