Update install script
This commit is contained in:
parent
6eddb84954
commit
95f04cd9ec
25
install.sh
25
install.sh
@ -1,12 +1,21 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
if [[ "$EUID" -ne 0 ]]; then
|
set -e
|
||||||
echo "You need to be root"
|
|
||||||
sudo $0 $@
|
SUDO='sudo'
|
||||||
exit
|
ANSIBLE_REPO='https://git.grondek.pl/pgrondek/ansible-desktop.git'
|
||||||
|
|
||||||
|
if [[ "$EUID" == 0 ]]; then
|
||||||
|
echo "Run script as normal user"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
apt update
|
$(SUDO) apt update
|
||||||
apt install software-properties-common
|
$(SUDO) apt install software-properties-common
|
||||||
apt-add-repository --yes --update ppa:ansible/ansible
|
$(SUDO) apt-add-repository --yes --update ppa:ansible/ansible
|
||||||
apt install -y git 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
|
||||||
|
Loading…
Reference in New Issue
Block a user