diff options
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) |