dotfiles/home/bin/executable_initial.tmpl

26 lines
551 B
Cheetah
Raw Normal View History

2022-12-10 17:09:35 -08:00
#!/usr/bin/env sh
set -e
echo -e "Starting initial setup for Fedora..."
# Install ansible and run playbook
sudo dnf -y update && sudo dnf install -y ansible
# 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 1
fi
sudo reboot