-
Notifications
You must be signed in to change notification settings - Fork 82
Expand file tree
/
Copy pathinstall.sh
More file actions
30 lines (23 loc) · 828 Bytes
/
install.sh
File metadata and controls
30 lines (23 loc) · 828 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/env bash
set -eu
title() {
local color='\033[1;37m'
local nc='\033[0m'
printf "\n${color}$1${nc}\n"
}
title "Install pip and Ansible"
sudo apt update
sudo apt install python3-venv python3-pip -y
python3 -m venv ~/ansible-venv
source ~/ansible-venv/bin/activate
pip install ansible
title "Install viasite-ansible.zsh"
ansible-galaxy install viasite-ansible.zsh --force
title "Download playbook to /tmp/zsh.yml"
curl https://raw.githubusercontent.com/viasite-ansible/ansible-role-zsh/master/playbook.yml > /tmp/zsh.yml
title "Provision playbook for root"
ansible-playbook -i "localhost," -c local -b /tmp/zsh.yml
title "Provision playbook for $(whoami)"
ansible-playbook -i "localhost," -c local -b /tmp/zsh.yml --extra-vars="zsh_user=$(whoami)"
title "Finished! Please, restart your shell."
echo ""