Update install script

This commit is contained in:
Przemek Grondek 2021-12-01 00:55:53 +01:00
parent 6eddb84954
commit 95f04cd9ec

View File

@ -1,12 +1,21 @@
#!/usr/bin/env bash
if [[ "$EUID" -ne 0 ]]; then
echo "You need to be root"
sudo $0 $@
exit
set -e
SUDO='sudo'
ANSIBLE_REPO='https://git.grondek.pl/pgrondek/ansible-desktop.git'
if [[ "$EUID" == 0 ]]; then
echo "Run script as normal user"
fi
apt update
apt install software-properties-common
apt-add-repository --yes --update ppa:ansible/ansible
apt install -y git ansible
$(SUDO) apt update
$(SUDO) apt install software-properties-common
$(SUDO) apt-add-repository --yes --update ppa:ansible/ansible
$(SUDO) apt install -y git ansible
mkdir -p $(HOME)/src
cd $(HOME)/src
git clone "$ANSIBLE_REPO"
cd ansible-desktop
ansible-playbook localhost.yml