summaryrefslogtreecommitdiff
path: root/roles/apache_server/templates/deploy_static_site_certs
blob: 35216512dedc7c8239f7682ee3aa533d5fbfd91f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/sh

set -eu


domains()
{
    cd /etc/letsencrypt/static_sites
    ls
}


opts()
{
    for domain in $(domains)
    do
        echo -w "/srv/http/$domain" -d "$domain" \
             --webroot-path "/srv/letsencrypt/$domain"
    done
}


certbot certonly \
        --noninteractive \
        --email "{{ letsencrypt_email }}" \
        --agree-tos \
        --expand \
        --cert-name static_sites \
        --webroot $(opts)