-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathspinup
executable file
·41 lines (32 loc) · 961 Bytes
/
spinup
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
#!/usr/bin/env bash
echo
echo -e "\033[38;5;255m\033[48;5;234m\033[1m S E T U P \033[0m"
echo
required_ansible_version="2.1.1.0"
if [[ "$(ansible --version | grep -oe '2\(.[0-9]\)*')" < $required_ansible_version ]]
then
echo "Ansible $required_ansible_version or higher is required."
exit -1;
fi
echo -n "Which provider are you using?
1. Amazon
2. Google
: "
read reply
case "$reply" in
1) echo -n "Are you provisioning an instance or creating a VPC?
a. Provisioning an Instance
b. Creating a VPC
: "
read choice;
case "$choice" in
a) echo; echo; ansible-playbook playbooks/amazon.yml;;
b) echo; echo; /bin/bash playbooks/roles/create-vpc/create_network_infastructure.sh;;
esac
;;
2) echo "***Temporary Warning***"
echo "This only works on Amazon AWS"
echo "Please restart the script and choose Amazon for your provider"
exit 1
;;
esac