Skip to content

Instantly share code, notes, and snippets.

@OliPelz
Last active March 22, 2023 12:06
Show Gist options
  • Save OliPelz/8f1824eb539c53360465a5c5f8129683 to your computer and use it in GitHub Desktop.
Save OliPelz/8f1824eb539c53360465a5c5f8129683 to your computer and use it in GitHub Desktop.
prepare vanilla system for ansible provisioning
# set location to fastest german mirror
sudo pacman-mirrors -c Germany
# update complete system
sudo pacman -Syyu --noconfirm
# check if restart is needed after updating
s1=$(pacman -Q linux | sed 's/linux[0-9]* //')
s2=$(uname -r | sed 's/-[A-Z]*$//')
if [ "$s1" == "$s2" ]; then
# NO REBOOT needed
# install essential dependencies to provision with ansiblet
sudo pacman -S ansible ansible-lint git python-pip vim make --noconfirm
else
echo REBOOT needed, than run script again
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment