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
|
- include: ../../includes/base-static/tasks/main.yml
|
||||||
vars:
|
vars:
|
||||||
site: ffnord.net
|
site: ffnord_site
|
||||||
domains:
|
domains:
|
||||||
- ffnord.net
|
- ffnord.net
|
||||||
- www.ffnord.net
|
- www.ffnord.net
|
||||||
- nord.freifunk.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
|
listing: false
|
||||||
|
|
||||||
- name: clone ffnord.net repository
|
- 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:
|
tags:
|
||||||
- nginx
|
- nginx
|
||||||
- website
|
- website
|
||||||
|
|
|
@ -12,6 +12,14 @@
|
||||||
- website
|
- website
|
||||||
- "{{ site }}"
|
- "{{ 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
|
- name: enable {{ site }} site
|
||||||
file: >
|
file: >
|
||||||
src=/etc/nginx/sites-available/{{ site }}
|
src=/etc/nginx/sites-available/{{ site }}
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
{% for port in ports %}
|
||||||
server {
|
server {
|
||||||
include /etc/nginx/include/no_logging.conf;
|
include /etc/nginx/include/no_logging.conf;
|
||||||
include /etc/nginx/include/no_dotfiles.conf;
|
include /etc/nginx/include/no_dotfiles.conf;
|
||||||
|
@ -7,11 +8,12 @@ server {
|
||||||
include /etc/nginx/include/listing.conf;
|
include /etc/nginx/include/listing.conf;
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
listen 80;
|
listen {{port.number}}{% if port.ssl %} ssl{% endif %};
|
||||||
listen [::]:80;
|
listen [::]:{{port.number}}{% if port.ssl %} ssl{% endif %};
|
||||||
|
|
||||||
server_name {{ domains | join(" ") }};
|
server_name {{ domains | join(" ") }};
|
||||||
|
|
||||||
root {{ document_root }};
|
root {{ document_root.path }};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{% endfor %}
|
||||||
|
|
|
@ -1,16 +1,13 @@
|
||||||
---
|
---
|
||||||
- include: ../../includes/base-static/tasks/main.yml
|
- include: ../../includes/base-static/tasks/main.yml
|
||||||
vars:
|
vars:
|
||||||
site: media_ffhh
|
site: ffhh_media
|
||||||
domains:
|
domains:
|
||||||
- media.services.ffhh
|
- media.services.ffhh
|
||||||
- media.hamburg.freifunk.net
|
- 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
|
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
|
- ntp-server
|
||||||
- website/ffnord
|
- website/ffnord
|
||||||
- website/media
|
- website/media
|
||||||
|
- website/meta
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue