]> gitweb.fluxo.info Git - puppet-certbot.git/commitdiff
Adds base_path config allowing standalone cerbot installs
authorSilvio Rhatto <rhatto@riseup.net>
Wed, 16 Nov 2016 13:14:58 +0000 (11:14 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Wed, 16 Nov 2016 13:14:58 +0000 (11:14 -0200)
manifests/init.pp
manifests/manage.pp

index 4a31bd97d18fb00c142cc87b4e365d216b7c2ad6..57c06fc3bdb4274b2b179b108aa9c88c21bf85c4 100644 (file)
@@ -1,4 +1,5 @@
 class certbot(
+  $base_path = '/usr/bin',
   $basedir   = '/var/spool/certbot',
   $owner     = 'www-data',
   $pre_hook  = '',
@@ -36,7 +37,7 @@ class certbot(
 
   # Chosing an arbitrary minite within the hour in the hope that won't overload Let's Encrypt servers
   cron { 'certbot-renew':
-    command => "/usr/bin/${tool} renew --standalone --quiet ${real_pre_hook} ${real_post_hook}",
+    command => "${base_path}/${tool} renew --standalone --quiet ${real_pre_hook} ${real_post_hook}",
     user    => 'root',
     hour    => [ 5, 23 ],
     minute  => "28",
index ce14b0f32979a9d210e5669c6c4c6b9f2aff0054..2481a8dcc268dd09d55591d7cd09ea10cfe0f10e 100644 (file)
@@ -27,7 +27,7 @@ define certbot::manage(
 
   # Make sure nginx is restarted and request a certificate
   exec { "certbot-${name}":
-    command => "${real_pre_hook}/usr/bin/certbot certonly --webroot -w ${::certbot::basedir}/${name} -d ${name} ${domains} -m ${email} --rsa-key-size ${size} --agree-tos",
+    command => "${real_pre_hook}${certbot::base_path}/${certbot::tool} certonly --webroot -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}"],
   }