-
Notifications
You must be signed in to change notification settings - Fork 3
/
google.yml
116 lines (100 loc) · 3.72 KB
/
google.yml
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
---
- name: Provision the GCE Server
# =======================================
hosts: localhost
connection: local
gather_facts: yes
vars:
zones:
"1": "us-central1-a"
"2": "us-central1-b"
"3": "us-central1-c"
"4": "us-central1-f"
"5": "us-east1-b"
"6": "us-east1-c"
"7": "us-east1-d"
"8": "us-west1-a"
"9": "us-west1-b"
"10": "europe-west1-b"
"11": "europe-west1-c"
"12": "europe-west1-d"
"13": "asia-east1-a"
"14": "asia-east1-b"
"15": "asia-east1-c"
"16": "asia-northeast1-a"
"17": "asia-northeast1-b"
"18": "asia-northeast1-c"
# These variable files are included so the gce-network role
# knows which ports to open
vars_files:
- roles/openconnect/defaults/main.yml
- roles/l2tp-ipsec/defaults/main.yml
- roles/openvpn/defaults/main.yml
- roles/shadowsocks/defaults/main.yml
- roles/ssh/defaults/main.yml
- roles/brasscrow-gateway/defaults/main.yml
- roles/stunnel/defaults/main.yml
- roles/tor-bridge/defaults/main.yml
- roles/wireguard/defaults/main.yml
vars_prompt:
- name: "gce_zone_var"
prompt: >
What zone should the server be located in?
1. Central US (Iowa A)
2. Central US (Iowa B)
3. Central US (Iowa C)
4. Central US (Iowa F)
5. Eastern US (South Carolina B)
6. Eastern US (South Carolina C)
7. Eastern US (South Carolina D)
8. Western US (Oregon A)
9. Western US (Oregon B)
10. Western Europe (Belgium B)
11. Western Europe (Belgium C)
12. Western Europe (Belgium D)
13. East Asia (Taiwan A)
14. East Asia (Taiwan B)
15. East Asia (Taiwan C)
16. Northeast Asia (Tokyo A)
17. Northeast Asia (Tokyo B)
18. Northeast Asia (Tokyo C)
Please choose the number of your zone. Press enter for default (#3) zone.
default: "3"
private: no
- name: "gce_machine_type"
prompt: >
What type of instance would you like ?
f1-micro (0.6GB RAM)
g1-small (1.7GB RAM)
default: "g1-small"
private: no
- name: "gce_server_name"
prompt: "\nWhat should the server be named? Press enter for default (brasscrow).\n"
default: "brasscrow"
private: no
- name: "gce_json_file_location"
prompt: "\n\nThe full path of your unique service account credentials file. Details on generating this can be found at \nhttp://docs.ansible.com/guide_gce.html#credentials\n and \nhttps://support.google.com/cloud/answer/6158849?hl=en&ref_topic=6262490#serviceaccounts\n"
default: "{{ lookup('env','HOME') }}/brasscrow.json"
private: no
- name: "confirmation"
prompt: "\nbrasscrow will now be setup on your server. This process usually takes around ten minutes. Press Enter to begin setup...\n"
pre_tasks:
- name: Set the Google Compute Engine Zone fact
set_fact:
gce_zone: "{{ zones[gce_zone_var] }}"
- name: Register JSON file contents
command: cat {{ gce_json_file_location }}
register: gce_json_file_contents
- name: Set JSON file contents fact
set_fact:
gce_json_contents_fact: "{{ gce_json_file_contents.stdout | from_json }}"
- name: Set the Google Compute Engine Service Account Email
set_fact:
gce_service_account_email: "{{ gce_json_contents_fact.client_email }}"
- name: Set the Google Compute Engine Project ID
set_fact:
gce_project_id: "{{ gce_json_contents_fact.project_id }}"
roles:
- genesis-google
- include: cloud-status.yml
- include: brasscrow.yml