This repository has been archived by the owner on Nov 17, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathpycon.fr.yml
215 lines (195 loc) · 7.34 KB
/
pycon.fr.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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
---
# After running this playbook on a new machine, you'll need either to:
# - Rsync /var/www/pycon/fr/ from another server or a backup.
# - Redeploy every sites (to run pelican / frozen-flask / ...).
- hosts: webservers
vars:
nginx_public_deploy_key: |
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINbgxOufHY7SxQrJNTlHmye+xeNHBA1O5SGtGhGeOVZM
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIvF5rwjx5lpjzH6B4Uce9kZhz260kkwzYvIieR189Q1
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFRY4/MaxUs8+mTrCKCXpHiXdrTjpNK9MqIpSpdLtxST pyconfr-2023
tasks:
- name: Basic setup
include_role: name=common
- name: Setup PyConFr
include_role: name=nginx
vars:
nginx_owner: pyconfr
nginx_domain: pycon.fr
nginx_certificates: ['pycon.fr', 'www.pycon.fr']
nginx_path: /var/www/pycon.fr/
nginx_conf: |
server
{
listen [::]:80; listen 80;
server_name .pycon.fr;
access_log /var/log/nginx/pycon.fr-access.log;
error_log /var/log/nginx/pycon.fr-error.log;
return 301 https://www.pycon.fr$request_uri;
}
server
{
listen [::]:443 ssl; listen 443 ssl;
server_name pycon.fr;
access_log /var/log/nginx/pycon.fr-access.log;
error_log /var/log/nginx/pycon.fr-error.log;
include snippets/letsencrypt-pycon.fr.conf;
return 301 https://www.pycon.fr$request_uri;
}
server
{
listen [::]:443 ssl; listen 443 ssl;
server_name www.pycon.fr;
access_log /var/log/nginx/pycon.fr-access.log;
error_log /var/log/nginx/pycon.fr-error.log;
include snippets/letsencrypt-pycon.fr.conf;
root /var/www/pycon.fr/;
charset utf-8;
location = / {
return 302 https://www.pycon.fr/2023$request_uri;
}
rewrite ^/2018/$ /2018/fr/index/ last;
rewrite ^/2018/(A-Za-z-)+/$ /2018/fr/$1/ last;
}
- name: Setup PyConFr 2016
include_role: name=nginx
vars:
nginx_domain: 2016.pycon.fr
nginx_certificates: [2016.pycon.fr]
nginx_conf: |
server
{
listen [::]:80; listen 80;
server_name 2016.pycon.fr;
access_log /var/log/nginx/2016.pycon.fr-access.log;
error_log /var/log/nginx/2016.pycon.fr-error.log;
return 301 https://www.pycon.fr/2016/;
}
server
{
listen [::]:443 ssl; listen 443 ssl;
server_name 2016.pycon.fr;
access_log /var/log/nginx/2016.pycon.fr-access.log;
error_log /var/log/nginx/2016.pycon.fr-error.log;
include snippets/letsencrypt-2016.pycon.fr.conf;
return 301 https://www.pycon.fr/2016/;
}
- name: Setup PyConFr 2012
include_role: name=nginx
vars:
nginx_domain: 2012.pycon.fr
nginx_certificates: [2012.pycon.fr]
nginx_conf: |
server
{
listen [::]:80; listen 80;
server_name 2012.pycon.fr;
access_log /var/log/nginx/2012.pycon.fr-access.log;
error_log /var/log/nginx/2012.pycon.fr-error.log;
return 301 https://www.pycon.fr/2012/;
}
server
{
listen [::]:443 ssl; listen 443 ssl;
server_name 2012.pycon.fr;
access_log /var/log/nginx/2012.pycon.fr-access.log;
error_log /var/log/nginx/2012.pycon.fr-error.log;
include snippets/letsencrypt-2012.pycon.fr.conf;
return 301 https://www.pycon.fr/2012/;
}
- name: Setup PyConFr 2011
include_role: name=nginx
vars:
nginx_domain: 2011.pycon.fr
nginx_certificates: [2011.pycon.fr]
nginx_conf: |
server
{
listen [::]:80; listen 80;
server_name 2011.pycon.fr;
access_log /var/log/nginx/2011.pycon.fr-access.log;
error_log /var/log/nginx/2011.pycon.fr-error.log;
return 301 https://www.pycon.fr/2011/;
}
server
{
listen [::]:443 ssl; listen 443 ssl;
server_name 2011.pycon.fr;
access_log /var/log/nginx/2011.pycon.fr-access.log;
error_log /var/log/nginx/2011.pycon.fr-error.log;
include snippets/letsencrypt-2011.pycon.fr.conf;
return 301 https://www.pycon.fr/2011/;
}
- name: Setup PyConFr 2010
include_role: name=nginx
vars:
nginx_domain: 2010.pycon.fr
nginx_certificates: [2010.pycon.fr]
nginx_conf: |
server
{
listen [::]:80; listen 80;
server_name 2010.pycon.fr;
access_log /var/log/nginx/2010.pycon.fr-access.log;
error_log /var/log/nginx/2010.pycon.fr-error.log;
return 301 https://www.pycon.fr/2010/;
}
server
{
listen [::]:443 ssl; listen 443 ssl;
server_name 2010.pycon.fr;
access_log /var/log/nginx/2010.pycon.fr-access.log;
error_log /var/log/nginx/2010.pycon.fr-error.log;
include snippets/letsencrypt-2010.pycon.fr.conf;
return 301 https://www.pycon.fr/2010/;
}
- name: Setup sigal of paullaroid.pycon.fr
include_role: name=nginx
vars:
nginx_owner: paullaroid
nginx_domain: paullaroid.pycon.fr
nginx_certificates: [paullaroid.pycon.fr]
nginx_path: /var/www/paullaroid.pycon.fr/
nginx_conf: |
server
{
listen [::]:80; listen 80;
server_name paullaroid.pycon.fr;
access_log /var/log/nginx/paullaroid.pycon.fr-access.log;
error_log /var/log/nginx/paullaroid.pycon.fr-error.log;
return 301 https://$host$request_uri;
}
server
{
listen [::]:443 ssl; listen 443 ssl;
charset utf-8;
server_name paullaroid.pycon.fr;
access_log /var/log/nginx/paullaroid.pycon.fr-access.log;
error_log /var/log/nginx/paullaroid.pycon.fr-error.log;
include snippets/letsencrypt-paullaroid.pycon.fr.conf;
root /var/www/paullaroid.pycon.fr/;
index index.html;
}
- name: Setup fr.pycon.org
include_role: name=julienpalard.nginx
vars:
nginx_domain: fr.pycon.org
nginx_certificates: [fr.pycon.org]
nginx_conf: |
server
{
listen [::]:80; listen 80;
server_name fr.pycon.org;
access_log /var/log/nginx/fr.pycon.org-access.log;
error_log /var/log/nginx/fr.pycon.org-error.log;
return 301 https://www.pycon.fr/;
}
server
{
listen [::]:443 ssl; listen 443 ssl;
server_name fr.pycon.org;
access_log /var/log/nginx/fr.pycon.org-access.log;
error_log /var/log/nginx/fr.pycon.org-error.log;
include snippets/letsencrypt-fr.pycon.org.conf;
return 301 https://www.pycon.fr/;
}