summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--manifests/certbot.pp3
-rw-r--r--manifests/site.pp3
2 files changed, 4 insertions, 2 deletions
diff --git a/manifests/certbot.pp b/manifests/certbot.pp
index e024b32..07ea20d 100644
--- a/manifests/certbot.pp
+++ b/manifests/certbot.pp
@@ -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}",
}
}
diff --git a/manifests/site.pp b/manifests/site.pp
index 14406d4..ec8ba69 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -52,7 +52,8 @@ define nginx::site(
if $certbot == true {
nginx::certbot { $name:
- ensure => $ensure,
+ ensure => $ensure,
+ require => File["/etc/nginx/sites-enabled/$name"],
}
}
}