-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbootstrap.sh
executable file
·43 lines (40 loc) · 1.39 KB
/
bootstrap.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
#!/bin/sh
# this is a simple bootstrap script to set up a new workstation the way i like.
# probably only works for MacOS right now because that's what i currently use.
# excuse my comments everywhere, this is a WIP and the comments will probably
# evolve into something resembling actual documentation in addition to README.md
# ansible-playbook provisioner.yml -i inventory
oschka=$(uname -s)
case $oschka in
Darwin)
read -p "=== checking for xcode: be logged into the app store, then press a key ==="
/usr/bin/xcode-select --install
read -p "when the installer is done, press a key"
if ! [ -x "$(command -v brew)" ]; then
echo "\nbrew isn't installed, let's fix that"
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi
brew install ansible
# end darwin
;;
Linux)
#### FIXME FIXME FIXME FIXME WORK IN PROGRESS FIXME FIXME FIXME FIXME ####
# what breed of penguin are we
if [ -x "$(command -v lsb_release)" ]; then
penguin_type=$(lsb_release -is)
type_vers=$(lsb_release -cs)
fi
case $penguin_type in
Ubuntu)
apt update
apt install software-properties-common
apt-add-repository --yes --update ppa:ansible/ansible
apt install ansible
;;
* )
echo "unsupported for now. :( install ansible."
;;
esac
# end linux
;;
esac