]> gitweb.fluxo.info Git - puppet-nginx.git/commitdiff
Enhance certbot
authorSilvio Rhatto <rhatto@riseup.net>
Thu, 16 Jun 2016 22:09:19 +0000 (19:09 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Thu, 16 Jun 2016 22:09:19 +0000 (19:09 -0300)
manifests/certbot.pp
manifests/site.pp

index e024b329c6c424146d990a17303d8b5b751a046d..07ea20dcaa18559d9a7f9d6163c100ca520a69a5 100644 (file)
@@ -14,6 +14,7 @@ define nginx::certbot(
   }
 
   exec { "certbot-${name}":
-    command => "/usr/bin/certbot certonly --webroot -w /var/www/certbot/${name} -d ${name} -m ${email} --rsa-key-size ${size} --agree-tos",
+    command => "/usr/bin/certbot certonly --webroot -w /var/www/certbot/${name} -d ${name} -d www.${name} -m ${email} --rsa-key-size ${size} --agree-tos",
+    creates => "/etc/letsencrypt/archive/${name}",
   }
 }
index 14406d4247c1768fed1ea32f94d9215669c093fb..ec8ba69313c6f13babf31dbe0557337f4dfb4b72 100644 (file)
@@ -52,7 +52,8 @@ define nginx::site(
 
   if $certbot == true {
     nginx::certbot { $name:
-      ensure => $ensure,
+      ensure  => $ensure,
+      require => File["/etc/nginx/sites-enabled/$name"],
     }
   }
 }