diff --git a/host_vars/proxy.moji.vm.openstreetmap.fr/proxy b/host_vars/proxy.moji.vm.openstreetmap.fr/proxy index 2e0f66f..438f47c 100644 --- a/host_vars/proxy.moji.vm.openstreetmap.fr/proxy +++ b/host_vars/proxy.moji.vm.openstreetmap.fr/proxy @@ -2,9 +2,10 @@ host_proxy: - logname: "osmose" - websites: "dev.osmose.openstreetmap.fr osmose.openstreetmap.fr" + websites: "osmose.openstreetmap.fr dev.osmose.openstreetmap.fr" target: "10.1.0.210" redirect_to_https: True + dedicated_certbot_cert: True - logname: "beta.osmose" websites: "beta.osmose.openstreetmap.fr" diff --git a/roles/proxycache/templates/nginx-site.j2 b/roles/proxycache/templates/nginx-site.j2 index 83abdc2..e294c7d 100644 --- a/roles/proxycache/templates/nginx-site.j2 +++ b/roles/proxycache/templates/nginx-site.j2 @@ -68,5 +68,9 @@ server { {% endif %} } {% endif %} +{% if item.dedicated_certbot_cert is defined %} + ssl_certificate /etc/letsencrypt/live/{{ item.websites.split(' ')[0] }}/fullchain.pem; # managed by Certbot + ssl_certificate_key /etc/letsencrypt/live/{{ item.websites.split(' ')[0] }}/privkey.pem; # managed by Certbot +{% endif %} }