summaryrefslogtreecommitdiff
path: root/puppet/modules/site_static/manifests
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2017-05-26 16:41:51 -0700
committerMicah Anderson <micah@riseup.net>2017-05-30 17:21:52 -0400
commit1e463c6638a05a237d660f458f5a147353be3fc1 (patch)
tree66eb49ffa0c44882d8a380795bbaa36003907911 /puppet/modules/site_static/manifests
parent2533f6f978bd3f0ee8187ee8827eb94b7e696377 (diff)
static - support for renewing certs with let's encrypt for static sites
Diffstat (limited to 'puppet/modules/site_static/manifests')
-rw-r--r--puppet/modules/site_static/manifests/domain.pp13
1 files changed, 9 insertions, 4 deletions
diff --git a/puppet/modules/site_static/manifests/domain.pp b/puppet/modules/site_static/manifests/domain.pp
index 6cf2c653..e456c94e 100644
--- a/puppet/modules/site_static/manifests/domain.pp
+++ b/puppet/modules/site_static/manifests/domain.pp
@@ -1,25 +1,30 @@
# configure static service for domain
define site_static::domain (
- $ca_cert,
+ $ca_cert=undef,
$key,
$cert,
$tls_only=true,
$use_hidden_service=false,
$locations=undef,
$aliases=undef,
- $apache_config=undef) {
+ $apache_config=undef,
+ $www_alias=false) {
$domain = $name
$base_dir = '/srv/static'
- $cafile = "${cert}\n${ca_cert}"
+ if ($ca_cert) {
+ $certfile = "${cert}\n${ca_cert}"
+ } else {
+ $certfile = $cert
+ }
if is_hash($locations) {
create_resources(site_static::location, $locations)
}
x509::cert { $domain:
- content => $cafile,
+ content => $certfile,
notify => Service[apache]
}
x509::key { $domain: