This repository was archived by the owner on Jun 4, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2k
/
Copy pathazure.yml
145 lines (129 loc) · 4.71 KB
/
azure.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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
---
- name: Provision the Azure Server (Resource Manager mode)
# ========================================================
hosts: localhost
connection: local
gather_facts: yes
vars:
regions:
"1": "eastus"
"2": "eastus2"
"3": "centralus"
"4": "northcentralus"
"5": "southcentralus"
"6": "westcentralus"
"7": "westus"
"8": "westus2"
"9": "usgovvirginia"
"10": "usgoviowa"
"11": "usdodeast"
"12": "usdodcentral"
"13": "canadaeast"
"14": "canadacentral"
"15": "brazilsouth"
"16": "southeastasia"
"17": "eastasia"
"18": "chinaeast"
"19": "chinanorth"
"20": "japaneast"
"21": "japanwest"
"22": "koreacentral"
"23": "koreasouth"
"24": "centralindia"
"25": "westindia"
"26": "southindia"
"27": "australiaeast"
"28": "australiasoutheast"
"29": "australiacentral"
"30": "australiacentral2"
"31": "northeurope"
"32": "westeurope"
"33": "germanycentral"
"34": "germanynortheast"
"35": "ukwest"
"36": "uksouth"
"37": "francecentral"
"38": "francesouth"
# These variable files are included so the azure-security-group role
# knows which ports to open
vars_files:
- roles/openconnect/defaults/main.yml
- roles/openvpn/defaults/main.yml
- roles/shadowsocks/defaults/main.yml
- roles/ssh/defaults/main.yml
- roles/lets-encrypt/vars/main.yml
- roles/streisand-gateway/defaults/main.yml
- roles/stunnel/defaults/main.yml
- roles/tor-bridge/defaults/main.yml
- roles/wireguard/defaults/main.yml
vars_prompt:
- name: "azure_region_var"
prompt: >
What region should the server be located in?
North America:
1: East US (Virginia)
2: East US 2 (Virginia)
3: Central US (Iowa)
4: North Central US (Illinois)
5: South Central US (Texas)
6: West Central US (West Central US)
7: West US (California)
8: West US 2 (West US 2)
9: US Gov Virginia (Virginia)
10: US Gov Iowa (Iowa)
11: US DoD East (US DoD East)
12: US DoD Central (US DoD Central)
13: Canada East (Quebec City)
14: Canada Central (Toronto)
South America:
15: Brazil South (Sao Paulo State)
Asia:
16: Southeast Asia (Singapore)
17: East Asia (Hong Kong)
18: China East (Shanghai)
19: China North (Beijing)
20: Japan East (Tokyo, Saitama)
21: Japan West (Osaka)
22: Korea Central (Seoul)
23: Korea South (Busan)
24: Central India (Pune)
25: West India (Mumbai)
26: South India (Chennai)
Australia:
27: Australia East (New South Wales)
28: Australia Southeast (Victoria)
29: Austrailia Central (Canberra)
30: Austrailia Central 2 (Canberra)
Europe:
31: North Europe (Ireland)
32: West Europe (Netherlands)
33: Germany Central (Frankfurt)
34: Germany Northeast (Magdeburg)
35: UK West (Cardiff)
36: UK South (London)
37: France Central (Paris)
38: France South (Marseille)
Please choose the number of your region: Press enter for default (#1) region.
default: "1"
private: no
- name: "azure_instance_name_var"
prompt: "\nWhat should the server be named? Press enter for default (streisand).\n"
default: "streisand"
private: no
- name: "confirmation_credentials"
prompt: "\nEnsure that you have the azure credentials file: ~/.azure/credentials \nDetails on generating this can be found at https://github.com/StreisandEffect/streisand/blob/master/documentation/AZURE.md"
- name: "confirmation"
prompt: "\nStreisand will now set up your server: This process usually takes around ten minutes: Press Enter to begin setup...\n"
pre_tasks:
- name: Set the Azure Region fact
set_fact:
azure_region: "{{ regions[azure_region_var] }}"
- name: Set the Azure Instance Name fact
set_fact:
azure_instance_name: "{{ azure_instance_name_var | regex_replace('\\s', '_') }}"
roles:
- genesis-azure
- import_playbook: ssh-setup.yml
- import_playbook: cloud-status.yml
- import_playbook: streisand.yml
...