summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--manifests/letsencrypt.pp18
1 files changed, 14 insertions, 4 deletions
diff --git a/manifests/letsencrypt.pp b/manifests/letsencrypt.pp
index b040724..64f4f82 100644
--- a/manifests/letsencrypt.pp
+++ b/manifests/letsencrypt.pp
@@ -1,9 +1,8 @@
+# Sets up letsencrypt for this host
class profiles::letsencrypt (
- String $certname,
- Array[String] $domains,
+ String $certname = $::fqdn,
+ Array[String] $domains = [ $::fqdn, ],
Enum['nginx','apache'] $provider,
- Optional[String] $nginx_plugin = undef,
- Optional[String] $apache_plugin = undef,
) {
include ::letsencrypt
@@ -14,6 +13,17 @@ class profiles::letsencrypt (
'apache' => 'systemctl restart apache2.service',
}
+ case $facts['os']['family'] {
+ 'Debian': {
+ $nginx_plugin = 'python3-certbot-nginx'
+ $apache_plugin = 'python3-certbot-apache'
+ }
+ 'Archlinux': {
+ $nginx_plugin = 'certbot-nginx'
+ $apache_plugin = 'certbot-apache'
+ }
+ }
+
case $provider {
'apache': {
ensure_packages ([$apache_plugin])