diff options
author | Lars Wirzenius <liw@liw.fi> | 2018-05-22 08:18:19 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2018-05-22 08:18:19 +0300 |
commit | 6b9e35fd4d34d6b26cc7d749dba4cd7a5d7c8ca8 (patch) | |
tree | e55225528894f37243d9a464193f76a83fc87caf /roles/apache_server/templates/deploy_static_site_certs | |
parent | 9443898ed15a4fa7b8d2712a073b1bd2b011fa0a (diff) | |
parent | 7e0a78dbc97c945fe9e8301eddec941649453909 (diff) | |
download | debian-ansible-6b9e35fd4d34d6b26cc7d749dba4cd7a5d7c8ca8.tar.gz |
Merge branch 'liw/le'
Diffstat (limited to 'roles/apache_server/templates/deploy_static_site_certs')
-rw-r--r-- | roles/apache_server/templates/deploy_static_site_certs | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/roles/apache_server/templates/deploy_static_site_certs b/roles/apache_server/templates/deploy_static_site_certs new file mode 100644 index 0000000..3521651 --- /dev/null +++ b/roles/apache_server/templates/deploy_static_site_certs @@ -0,0 +1,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) |