Update updates role
This commit is contained in:
parent
edae4c4089
commit
1eac320d75
|
@ -1,7 +1,8 @@
|
||||||
certsync_host: srv01.hamburg.freifunk.net
|
certsync_host: srv01.hamburg.freifunk.net
|
||||||
nginx_resolver: 80.252.105.162 80.252.105.194
|
nginx_resolver: 80.252.105.162 80.252.105.194
|
||||||
updates_letsencrypt_srv01: true
|
updates_letsencrypt_srv01: true
|
||||||
updates_owner: www-data
|
updates_owner: ffupdates
|
||||||
|
updates_group: www-data
|
||||||
updates_root: /var/www/updates
|
updates_root: /var/www/updates
|
||||||
updates_ssl_certificate: /etc/ssl/certsync/updates.hamburg.freifunk.net.crt
|
updates_ssl_certificate: /etc/ssl/certsync/updates.hamburg.freifunk.net.crt
|
||||||
updates_ssl_certificate_key: /etc/ssl/certsync/updates.hamburg.freifunk.net.key
|
updates_ssl_certificate_key: /etc/ssl/certsync/updates.hamburg.freifunk.net.key
|
||||||
|
|
|
@ -4,4 +4,5 @@ updates_letsencrypt_local: false
|
||||||
updates_letsencrypt_srv01: false
|
updates_letsencrypt_srv01: false
|
||||||
updates_letsencrypt_srv02: false
|
updates_letsencrypt_srv02: false
|
||||||
updates_owner: ffupdates
|
updates_owner: ffupdates
|
||||||
|
updates_group: ffupdates
|
||||||
updates_root: /home/ffupdates/updates
|
updates_root: /home/ffupdates/updates
|
||||||
|
|
|
@ -7,9 +7,14 @@
|
||||||
file:
|
file:
|
||||||
path: "{{ updates_root }}"
|
path: "{{ updates_root }}"
|
||||||
owner: "{{ updates_owner }}"
|
owner: "{{ updates_owner }}"
|
||||||
group: "{{ updates_owner }}"
|
group: "{{ updates_group }}"
|
||||||
state: directory
|
state: directory
|
||||||
|
|
||||||
|
- name: copy updates_domains.conf
|
||||||
|
copy:
|
||||||
|
src: updates_domains.conf
|
||||||
|
dest: /etc/nginx/include
|
||||||
|
|
||||||
- name: template site
|
- name: template site
|
||||||
template:
|
template:
|
||||||
src: templates/site.j2
|
src: templates/site.j2
|
||||||
|
|
|
@ -11,14 +11,11 @@ server {
|
||||||
ssl_certificate_key {{ updates_ssl_certificate_key }};
|
ssl_certificate_key {{ updates_ssl_certificate_key }};
|
||||||
|
|
||||||
root {{ updates_root }};
|
root {{ updates_root }};
|
||||||
|
include /etc/nginx/include/updates_domains.conf;
|
||||||
if ($ffhh-sued) {
|
include /etc/nginx/include/listing.conf;
|
||||||
rewrite ^/(beta|experimental|stable)/(.*)$ /ffhh-sued/$1/$2;
|
|
||||||
}
|
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
include /etc/nginx/include/headers_hsts.conf;
|
include /etc/nginx/include/headers_hsts.conf;
|
||||||
include /etc/nginx/include/listing.conf;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
location = /config {
|
location = /config {
|
||||||
|
@ -37,14 +34,8 @@ server {
|
||||||
server_name updates.hamburg.freifunk.net;
|
server_name updates.hamburg.freifunk.net;
|
||||||
|
|
||||||
root {{ updates_root }};
|
root {{ updates_root }};
|
||||||
|
include /etc/nginx/include/updates_domains.conf;
|
||||||
if ($ffhh-sued) {
|
|
||||||
rewrite ^/(beta|experimental|stable)/(.*)$ /ffhh-sued/$1/$2;
|
|
||||||
}
|
|
||||||
|
|
||||||
location / {
|
|
||||||
include /etc/nginx/include/listing.conf;
|
include /etc/nginx/include/listing.conf;
|
||||||
}
|
|
||||||
{% if updates_letsencrypt_local %}
|
{% if updates_letsencrypt_local %}
|
||||||
|
|
||||||
include /etc/nginx/include/letsencrypt.conf;
|
include /etc/nginx/include/letsencrypt.conf;
|
||||||
|
@ -66,12 +57,6 @@ server {
|
||||||
server_name *.updates.services.ffhh;
|
server_name *.updates.services.ffhh;
|
||||||
|
|
||||||
root {{ updates_root }};
|
root {{ updates_root }};
|
||||||
|
include /etc/nginx/include/updates_domains.conf;
|
||||||
if ($ffhh-sued) {
|
|
||||||
rewrite ^/(beta|experimental|stable)/(.*)$ /ffhh-sued/$1/$2;
|
|
||||||
}
|
|
||||||
|
|
||||||
location / {
|
|
||||||
include /etc/nginx/include/listing.conf;
|
include /etc/nginx/include/listing.conf;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in a new issue