debian.ansible.kodi/raspi.sh
2022-11-17 13:42:01 +01:00

31 lines
823 B
Bash

#!/bin/bash
sudo apt-get update
sudo apt-get -yy dist-upgrade
# install ansible
which pip >/dev/null 2>&1 || ( sudo apt-get -yy install python3-pip )
which git >/dev/null 2>&1 || ( sudo apt-get -yy install git )
which ansible >/dev/null 2>&1 || sudo pip install ansible
# run ansible playbooks
for playbook in debian.ansible.basics \
gtc-rename \
gtc-crypt \
debian.ansible.docker \
debian.ansible.firewall \
debian.ansible.flatpak \
debian.ansible.kodi
do
sudo rm -rf ${playbook}
git clone https://gitea.ds9.dedyn.io/olli/${playbook}.git
sudo ansible-playbook --connection=local --inventory $(hostname), --limit $(hostname) ${playbook}/*.yml
sudo rm -rf ${playbook}
done
echo '#!/bin/bash
gnome-terminal -- ~/share.sh
' >/home/pi/.xsessionrc
chmod 700 /home/pi/.xsessionrc
chown pi. /home/pi/.xsessionrc