diff options
author | Lars Wirzenius <liw@liw.fi> | 2018-06-19 15:34:36 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2018-06-19 15:34:36 +0300 |
commit | 272c174a5a4718ce6cdae4e620f2d07f99d4772c (patch) | |
tree | d3b38677ae83f5f035cbfc730ac9e1fac9f4faef /roles/apache_server/templates/deploy_static_site_certs | |
parent | be4a3d1b5d8c91ba95060658a276de4a8e9af2e2 (diff) | |
download | debian-ansible-272c174a5a4718ce6cdae4e620f2d07f99d4772c.tar.gz |
Change: support static website aliases for letsenrypt
Diffstat (limited to 'roles/apache_server/templates/deploy_static_site_certs')
-rw-r--r-- | roles/apache_server/templates/deploy_static_site_certs | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/roles/apache_server/templates/deploy_static_site_certs b/roles/apache_server/templates/deploy_static_site_certs index 3521651..b0227e8 100644 --- a/roles/apache_server/templates/deploy_static_site_certs +++ b/roles/apache_server/templates/deploy_static_site_certs @@ -9,21 +9,22 @@ domains() ls } - opts() { - for domain in $(domains) + domains | while read domain alias do - echo -w "/srv/http/$domain" -d "$domain" \ - --webroot-path "/srv/letsencrypt/$domain" + echo -w "/srv/letsencrypt/$domain" -d "$domain" + if [ -n "$alias" ] + then + echo -d "$alias" + fi done } - certbot certonly \ - --noninteractive \ - --email "{{ letsencrypt_email }}" \ - --agree-tos \ - --expand \ - --cert-name static_sites \ - --webroot $(opts) + --noninteractive \ + --email "{{ letsencrypt_email }}" \ + --agree-tos \ + --expand \ + --cert-name static_sites \ + --webroot $(opts) |