HTTPS for pelicans.

This commit is contained in:
Julien Palard 2019-02-12 22:53:09 +01:00
parent 36a1382e88
commit 77651d01a0
5 changed files with 24 additions and 6 deletions

View File

@ -1,2 +1,3 @@
[defaults]
inventory = inventory
nocows = 1

View File

@ -1,23 +1,26 @@
---
- hosts: all
roles: [common]
- hosts: gallery
roles: [common, gallery]
roles: [gallery]
- hosts: pycons
roles: [common, pelican]
roles: [pelican]
vars:
pelican_user: pycon2010
pelican_https: false
pelican_https: true
pelican_domain: 2010.pycon.fr
pelican_repo: https://github.com/AFPy/pyconfr_2010
pelican_path_in_repo: 2010/
pelican_home: "/srv/{{ pelican_user }}/"
- hosts: pycons
roles: [common, pelican]
roles: [pelican]
vars:
pelican_user: pycon2011
pelican_https: false
pelican_https: true
pelican_domain: 2011.pycon.fr
pelican_repo: https://github.com/AFPy/pyconfr_2010
pelican_path_in_repo: 2011/

View File

@ -0,0 +1,10 @@
# Letsencrypt role
This role uses the standalone mode of certbot if no webserver is
running (typically during the first installation), else uses the nginx
module.
Note that existing certificates are renewed (using the nginx module)
as a cron task/systemd timer.
It creates snippets in `/etc/nginx/snippets/letsencrypt-{{ fqdn }}.conf`.

View File

@ -0,0 +1,4 @@
---
dependencies:
- { role: letsencrypt, domains: ["{{ pelican_domain }}"] }

View File

@ -16,7 +16,7 @@ server
include snippets/letsencrypt-{{ pelican_domain }}.conf;
location / {
root {{ pelican_home }}/repo/_build/;
root {{ pelican_home }}/www/;
try_files $uri $uri/ =404;
}
}