#!/bin/bash -x # Installs Prereqs. "bash -x" (xtrace) like -v (verbose) but expands commands. # 1. RUN: "sudo su -" then "raspi-config" to set "Localisation Options" # 2. OPTIONAL: "passwd pi; touch /boot/ssh; reboot" to ssh in immediately # 3. RUN THIS SCRIPT: curl download.iiab.io/6.5/load-prep.txt | bash set -e # to exit on error (avoids snowballing) if grep -qi raspbian /etc/*release; then tune2fs -m 1 /dev/mmcblk0p2; fi # If OS is Raspbian, lowers reserve disk space from ~5% to 1% export DEBIAN_FRONTEND=noninteractive apt update apt -y dist-upgrade apt -y clean # Above updates OS for security especially apt -y install git echo "deb http://ppa.launchpad.net/ansible/ansible/ubuntu xenial main" >> /etc/apt/sources.list apt -y install dirmngr apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 93C4A3FD7BB9C367 apt update apt -y install ansible # Installs latest Ansible from PPA