Update updates role

This commit is contained in:
Alexander Dietrich 2017-11-04 16:54:59 +01:00
parent edae4c4089
commit 1eac320d75
4 changed files with 15 additions and 23 deletions

View file

@ -1,7 +1,8 @@
certsync_host: srv01.hamburg.freifunk.net
nginx_resolver: 80.252.105.162 80.252.105.194
updates_letsencrypt_srv01: true
updates_owner: www-data
updates_owner: ffupdates
updates_group: www-data
updates_root: /var/www/updates
updates_ssl_certificate: /etc/ssl/certsync/updates.hamburg.freifunk.net.crt
updates_ssl_certificate_key: /etc/ssl/certsync/updates.hamburg.freifunk.net.key

View file

@ -4,4 +4,5 @@ updates_letsencrypt_local: false
updates_letsencrypt_srv01: false
updates_letsencrypt_srv02: false
updates_owner: ffupdates
updates_group: ffupdates
updates_root: /home/ffupdates/updates

View file

@ -7,9 +7,14 @@
file:
path: "{{ updates_root }}"
owner: "{{ updates_owner }}"
group: "{{ updates_owner }}"
group: "{{ updates_group }}"
state: directory
- name: copy updates_domains.conf
copy:
src: updates_domains.conf
dest: /etc/nginx/include
- name: template site
template:
src: templates/site.j2

View file

@ -11,14 +11,11 @@ server {
ssl_certificate_key {{ updates_ssl_certificate_key }};
root {{ updates_root }};
if ($ffhh-sued) {
rewrite ^/(beta|experimental|stable)/(.*)$ /ffhh-sued/$1/$2;
}
include /etc/nginx/include/updates_domains.conf;
include /etc/nginx/include/listing.conf;
location / {
include /etc/nginx/include/headers_hsts.conf;
include /etc/nginx/include/listing.conf;
}
location = /config {
@ -37,14 +34,8 @@ server {
server_name updates.hamburg.freifunk.net;
root {{ updates_root }};
if ($ffhh-sued) {
rewrite ^/(beta|experimental|stable)/(.*)$ /ffhh-sued/$1/$2;
}
location / {
include /etc/nginx/include/listing.conf;
}
include /etc/nginx/include/updates_domains.conf;
include /etc/nginx/include/listing.conf;
{% if updates_letsencrypt_local %}
include /etc/nginx/include/letsencrypt.conf;
@ -66,12 +57,6 @@ server {
server_name *.updates.services.ffhh;
root {{ updates_root }};
if ($ffhh-sued) {
rewrite ^/(beta|experimental|stable)/(.*)$ /ffhh-sued/$1/$2;
}
location / {
include /etc/nginx/include/listing.conf;
}
include /etc/nginx/include/updates_domains.conf;
include /etc/nginx/include/listing.conf;
}