Erste Config für media.

This commit is contained in:
baldo 2015-08-30 15:34:47 +02:00
parent 543f650d84
commit bffd8b1db9
12 changed files with 77 additions and 33 deletions

View file

@ -0,0 +1,5 @@
location / {
autoindex on;
autoindex_exact_size on;
autoindex_localtime off;
}

View file

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

View file

@ -1,4 +0,0 @@
---
handlers:
- include: ../../nginx/handlers/main.yml

View file

@ -1,3 +1,4 @@
--- ---
dependencies: dependencies:
- { role: nginx } - role: nginx

View file

@ -1,30 +1,13 @@
--- ---
- name: configure ffnord.net site - include: ../../includes/base-static/tasks/main.yml
copy: > vars:
src=etc/nginx/sites-available/ffnord.net site: ffnord.net
dest=/etc/nginx/sites-available/ffnord.net domains:
owner=root - ffnord.net
group=root - www.ffnord.net
mode=0644 - nord.freifunk.net
notify: reload nginx config document_root: /var/www/ffnord.net/site
tags: listing: false
- nginx
- website
- ffnord
- name: enable ffnord.net site
file: >
src=/etc/nginx/sites-available/ffnord.net
dest=/etc/nginx/sites-enabled/ffnord.net
owner=root
group=root
mode=0644
state=link
notify: reload nginx config
tags:
- nginx
- website
- ffnord
- 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.net

View file

@ -0,0 +1,2 @@
---
- include: ../../../../nginx/handlers/main.yml

View file

@ -0,0 +1,28 @@
---
- name: configure {{ site }} site
template: >
src=site.j2
dest=/etc/nginx/sites-available/{{ site }}
owner=root
group=root
mode=0644
notify: reload nginx config
tags:
- nginx
- website
- "{{ site }}"
- name: enable {{ site }} site
file: >
src=/etc/nginx/sites-available/{{ site }}
dest=/etc/nginx/sites-enabled/{{ site }}
owner=root
group=root
mode=0644
state=link
notify: reload nginx config
tags:
- nginx
- website
- "{{ site }}"

View file

@ -3,11 +3,15 @@ server {
include /etc/nginx/include/no_dotfiles.conf; include /etc/nginx/include/no_dotfiles.conf;
include /etc/nginx/include/no_symlinks.conf; include /etc/nginx/include/no_symlinks.conf;
{% if listing %}
include /etc/nginx/include/listing.conf;
{% endif %}
listen 80; listen 80;
listen [::]:80; listen [::]:80;
server_name ffnord.net www.ffnord.net nord.freifunk.net; server_name {{ domains | join(" ") }};
root /var/www/ffnord.net/site; root {{ document_root }};
} }

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,16 @@
---
- include: ../../includes/base-static/tasks/main.yml
vars:
site: media_ffhh
domains:
- media.services.ffhh
- media.hamburg.freifunk.net
document_root: /var/www/media
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

@ -3,4 +3,5 @@
roles: roles:
- ntp-server - ntp-server
- website/ffnord - website/ffnord
- website/media