2020-07-01 14:26:49 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2021-11-30 23:55:53 +00:00
|
|
|
set -e
|
|
|
|
|
|
|
|
SUDO='sudo'
|
|
|
|
ANSIBLE_REPO='https://git.grondek.pl/pgrondek/ansible-desktop.git'
|
|
|
|
|
|
|
|
if [[ "$EUID" == 0 ]]; then
|
|
|
|
echo "Run script as normal user"
|
2020-07-01 14:26:49 +00:00
|
|
|
fi
|
|
|
|
|
2021-11-30 23:55:53 +00:00
|
|
|
$(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
|