ansible-desktop/install.sh

22 lines
466 B
Bash
Raw Normal View History

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
2022-05-19 17:18:29 +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
2021-11-30 23:55:53 +00:00
2022-05-19 17:18:29 +00:00
mkdir -p "${HOME}/src"
cd "${HOME}/src"
2021-11-30 23:55:53 +00:00
git clone "$ANSIBLE_REPO"
cd ansible-desktop
ansible-playbook localhost.yml