summaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2018-05-30 18:14:42 -0300
committerSilvio Rhatto <rhatto@riseup.net>2018-05-30 18:14:42 -0300
commitca6f53305ea12ecd177669a43fa80c0cd1941982 (patch)
tree48c751175d4be90bd1313ebdd8b6d0de00fa54af /manifests
parentd962ce2c96e801578eaecd4ceb28b780284a3d69 (diff)
downloadpuppet-certbot-ca6f53305ea12ecd177669a43fa80c0cd1941982.tar.gz
puppet-certbot-ca6f53305ea12ecd177669a43fa80c0cd1941982.tar.bz2
Support for plugins other than standalone
Diffstat (limited to 'manifests')
-rw-r--r--manifests/init.pp5
-rw-r--r--manifests/manage.pp3
2 files changed, 5 insertions, 3 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index bd75c51..bfd7210 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -4,6 +4,7 @@ class certbot(
$owner = 'www-data',
$pre_hook = '',
$post_hook = '',
+ $plugin = 'standalone',
) {
$tool = $::lsbdistcodename ? {
@@ -35,9 +36,9 @@ class certbot(
require => File[$basedir],
}
- # Chosing an arbitrary minite within the hour in the hope that won't overload Let's Encrypt servers
+ # Chosing an arbitrary minute within the hour in the hope that won't overload Let's Encrypt servers
cron { 'certbot-renew':
- command => "${script_base}/${tool} renew --standalone --quiet -n ${real_pre_hook} ${real_post_hook}",
+ command => "${script_base}/${tool} renew --${plugin} --quiet -n ${real_pre_hook} ${real_post_hook}",
user => 'root',
hour => [ 5, 23 ],
minute => "28",
diff --git a/manifests/manage.pp b/manifests/manage.pp
index 7a3613c..77cc244 100644
--- a/manifests/manage.pp
+++ b/manifests/manage.pp
@@ -2,6 +2,7 @@ define certbot::manage(
$pre_hook = '',
$aliases = "www.${name}",
$ensure = present,
+ $plugin = 'standalone',
$email = hiera('certbot::manage::email'),
$size = hiera('certbot::manage::size', '4096'),
){
@@ -27,7 +28,7 @@ define certbot::manage(
# Make sure nginx is restarted and request a certificate
exec { "certbot-${name}":
- command => "${real_pre_hook}${certbot::script_base}/${certbot::tool} certonly -n --webroot -w ${::certbot::basedir}/${name} -d ${name} ${domains} -m ${email} --rsa-key-size ${size} --agree-tos",
+ command => "${real_pre_hook}${certbot::script_base}/${certbot::tool} certonly -n --${plugin} -w ${::certbot::basedir}/${name} -d ${name} ${domains} -m ${email} --rsa-key-size ${size} --agree-tos",
creates => "/etc/letsencrypt/archive/${name}",
require => File["${::certbot::basedir}/${name}"],
}