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

28 lines
595 B
Bash

#!/usr/bin/env bash
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
# Install ansible extensions
ansible-galaxy install -r {{ .chezmoi.workingTree }}/provision/requirements.yml
# Goto playbook and run it
cd {{ .chezmoi.workingTree }}/provision
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
fi
sudo reboot