dotfiles/home/bin/executable_void-initial-setup.tmpl

28 lines
595 B
Cheetah
Raw Normal View History

#!/usr/bin/env bash
2022-12-10 17:09:35 -08:00
echo -e "Starting initial setup..."
# Install ansible python dependencies
sudo xpbs-install -Syu
sudo xbps-install python3 python3-pip ansible
sudo pip install pexpect github3.py
2022-12-10 17:09:35 -08:00
# Install ansible extensions
2022-12-10 23:53:30 -08:00
ansible-galaxy install -r {{ .chezmoi.workingTree }}/provision/requirements.yml
2022-12-10 17:09:35 -08:00
# Goto playbook and run it
2022-12-10 23:53:30 -08:00
cd {{ .chezmoi.workingTree }}/provision
2022-12-10 17:09:35 -08:00
ansible-playbook setup.yml -i hosts --ask-become-pass
# Return to where you were
cd -
read -p "Reboot? " -n 1 -r
echo # (optional) move to a new line
if [[ ! $REPLY =~ ^[Yy]$ ]]
then
exit 0
2022-12-10 17:09:35 -08:00
fi
sudo reboot