meta.hamburg.freifunk.net und Umstrukturierung
This commit is contained in:
parent
8374c1259f
commit
b56b258d91
|
@ -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
|
||||
|
|
|
@ -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 }}
|
||||
|
|
|
@ -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 %}
|
||||
|
|
|
@ -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
|
||||
|
|
2
roles/website/meta/handlers/main.yml
Normal file
2
roles/website/meta/handlers/main.yml
Normal file
|
@ -0,0 +1,2 @@
|
|||
---
|
||||
- include: ../../includes/base-static/handlers/main.yml
|
4
roles/website/meta/meta/main.yml
Normal file
4
roles/website/meta/meta/main.yml
Normal file
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
dependencies:
|
||||
- role: nginx
|
||||
|
12
roles/website/meta/tasks/main.yml
Normal file
12
roles/website/meta/tasks/main.yml
Normal 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
|
||||
|
|
@ -4,4 +4,5 @@
|
|||
- ntp-server
|
||||
- website/ffnord
|
||||
- website/media
|
||||
- website/meta
|
||||
|
||||
|
|
Loading…
Reference in a new issue