60 lines
1.6 KiB
YAML
60 lines
1.6 KiB
YAML
|
---
|
||
|
|
||
|
- hosts: dl
|
||
|
tasks:
|
||
|
- name: Basic setup
|
||
|
include_role: name=common
|
||
|
|
||
|
- name: Install nginx fancyindex
|
||
|
apt:
|
||
|
name: libnginx-mod-http-fancyindex
|
||
|
state: present
|
||
|
|
||
|
- name: Setup afpy.org
|
||
|
include_role: name=julienpalard.nginx
|
||
|
vars:
|
||
|
nginx_owner: dl-afpy-org
|
||
|
nginx_domain: dl.afpy.org
|
||
|
nginx_certificates: [dl.afpy.org, videos-2015.pycon.fr]
|
||
|
nginx_conf: |
|
||
|
server
|
||
|
{
|
||
|
listen 80;
|
||
|
server_name dl.afpy.org videos-2015.pycon.fr;
|
||
|
access_log /var/log/nginx/http-access.log;
|
||
|
error_log /var/log/nginx/http-error.log;
|
||
|
return 301 https://$host$request_uri;
|
||
|
}
|
||
|
|
||
|
server
|
||
|
{
|
||
|
listen 443 ssl;
|
||
|
server_name dl.afpy.org;
|
||
|
access_log /var/log/nginx/dl.afpy.org-access.log;
|
||
|
error_log /var/log/nginx/dl.afpy.org-error.log;
|
||
|
include snippets/letsencrypt-dl.afpy.org.conf;
|
||
|
|
||
|
root /var/www/dl.afpy.org/;
|
||
|
|
||
|
location /
|
||
|
{
|
||
|
fancyindex on;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
server
|
||
|
{
|
||
|
listen 443 ssl;
|
||
|
server_name videos-2015.pycon.fr;
|
||
|
access_log /var/log/nginx/videos-2015.pycon.fr-access.log;
|
||
|
error_log /var/log/nginx/videos-2015.pycon.fr-error.log;
|
||
|
include snippets/letsencrypt-dl.afpy.org.conf;
|
||
|
|
||
|
root /var/www/videos-2015.pycon.fr/;
|
||
|
|
||
|
location /
|
||
|
{
|
||
|
index index.html;
|
||
|
}
|
||
|
}
|