-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstart.sh
46 lines (31 loc) · 1.07 KB
/
start.sh
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/bin/bash
# script to bootstrap setting up a mac with ansible
function uninstall {
echo "WARNING : This will remove homebrew and all applications installed through it"
echo -n "are you sure you want to do that? [y/n] : "
read confirmation
if [ $confirmation == "y" ]; then
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
exit 0
else
echo "keeping everything intact"
exit 0
fi
}
if [ $1 == "uninstall" ]; then
uninstall
fi
echo "==========================================="
echo " Setting up your mac using ansible"
echo "==========================================="
xcode-select --install
# sudo easy_install pip
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python3 get-pip.py
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install ansible
ansible-playbook -i hosts playbook.yml --verbose
echo "==========================================="
echo " Finish environment configuration "
echo "==========================================="
exit 0