meta.hamburg.freifunk.net und Umstrukturierung

This commit is contained in:
baldo 2015-08-30 17:55:05 +02:00
parent 8374c1259f
commit b56b258d91
8 changed files with 42 additions and 14 deletions

View file

@ -1,16 +1,18 @@
---
- include: ../../includes/base-static/tasks/main.yml
vars:
site: ffnord.net
site: ffnord_site
domains:
- ffnord.net
- www.ffnord.net
- nord.freifunk.net
document_root: /var/www/ffnord.net/site
ports:
- { number: 80, ssl: false }
document_root: { path: /var/www/ffnord/site/site, create: false }
listing: false
- name: clone ffnord.net repository
git: repo=https://github.com/ffnord/ffnord.net.git dest=/var/www/ffnord.net
git: repo=https://github.com/ffnord/ffnord.net.git dest=/var/www/ffnord/site
tags:
- nginx
- website

View file

@ -12,6 +12,14 @@
- website
- "{{ site }}"
- name: create {{ site }} root
file: path={{ document_root.path }} state=directory owner=www-data group=www-data mode=0755
when: document_root.create
tags:
- nginx
- website
- "{{ site }}"
- name: enable {{ site }} site
file: >
src=/etc/nginx/sites-available/{{ site }}

View file

@ -1,3 +1,4 @@
{% for port in ports %}
server {
include /etc/nginx/include/no_logging.conf;
include /etc/nginx/include/no_dotfiles.conf;
@ -7,11 +8,12 @@ server {
include /etc/nginx/include/listing.conf;
{% endif %}
listen 80;
listen [::]:80;
listen {{port.number}}{% if port.ssl %} ssl{% endif %};
listen [::]:{{port.number}}{% if port.ssl %} ssl{% endif %};
server_name {{ domains | join(" ") }};
root {{ document_root }};
root {{ document_root.path }};
}
{% endfor %}

View file

@ -1,16 +1,13 @@
---
- include: ../../includes/base-static/tasks/main.yml
vars:
site: media_ffhh
site: ffhh_media
domains:
- media.services.ffhh
- media.hamburg.freifunk.net
document_root: /var/www/media
ports:
- { number: 80, ssl: false }
- { number: 443, ssl: true }
document_root: { path: /var/www/ffhh/media, create: true }
listing: true
- name: create media root
file: path=/var/www/media state=directory owner=www-data group=www-data mode=0755
tags:
- nginx
- website
- media_ffhh

View file

@ -0,0 +1,2 @@
---
- include: ../../includes/base-static/handlers/main.yml

View file

@ -0,0 +1,4 @@
---
dependencies:
- role: nginx

View file

@ -0,0 +1,12 @@
---
- include: ../../includes/base-static/tasks/main.yml
vars:
site: ffhh_meta
domains:
- meta.hamburg.freifunk.net
ports:
- { number: 80, ssl: false }
- { number: 443, ssl: true }
document_root: { path: /var/www/ffhh/meta, create: true }
listing: true

View file

@ -4,4 +4,5 @@
- ntp-server
- website/ffnord
- website/media
- website/meta