#!/bin/bash -e
# Running from a git repo
# Assumes iiab repos are downloaded

apt -y update
apt -y full-upgrade

apt -y install git curl nano gawk wget pastebinit

cd /opt/iiab/iiab
scripts/ansible

# 2022-09-27: iiab-install now handles this
#mkdir -p /etc/iiab/install-flags

if [ ! -f /etc/iiab/local_vars.yml ]; then
  cp /opt/iiab/iiab/vars/local_vars_none.yml /etc/iiab/local_vars.yml
fi

reboot
