summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2022-02-09 18:27:12 +0100
committerHugo Hörnquist <hugo@lysator.liu.se>2022-02-09 18:27:12 +0100
commit660ebcdc696006fb944c98ac6feee038733bb850 (patch)
tree343bbf5a5681e2973fac7e8eaf2b1f05b4de7341
parentChange repo-url. (diff)
downloadprofiles-660ebcdc696006fb944c98ac6feee038733bb850.tar.gz
profiles-660ebcdc696006fb944c98ac6feee038733bb850.tar.xz
Letsencrypt more OS:s.
-rw-r--r--manifests/letsencrypt.pp23
1 files changed, 22 insertions, 1 deletions
diff --git a/manifests/letsencrypt.pp b/manifests/letsencrypt.pp
index 64f4f82..1608254 100644
--- a/manifests/letsencrypt.pp
+++ b/manifests/letsencrypt.pp
@@ -7,6 +7,7 @@ class profiles::letsencrypt (
include ::letsencrypt
+ # TODO general restart comman
$plugin = $provider
$post_hook = $provider ? {
'nginx' => 'systemctl restart nginx.service',
@@ -18,10 +19,31 @@ class profiles::letsencrypt (
$nginx_plugin = 'python3-certbot-nginx'
$apache_plugin = 'python3-certbot-apache'
}
+ 'RedHat': {
+ if $facts['os']['name'] == 'Fedora' {
+ $nginx_plugin = 'python3-certbot-nginx'
+ $apache_plugin = 'python3-certbot-apache'
+ } else {
+ case $facts['os']['release']['major'] {
+ '7': {
+ $nginx_plugin = 'python2-certbot-nginx'
+ $apache_plugin = 'python2-certbot-apache'
+ }
+ '8': {
+ $nginx_plugin = 'python3-certbot-nginx'
+ $apache_plugin = 'python3-certbot-apache'
+ }
+ }
+ }
+ }
'Archlinux': {
$nginx_plugin = 'certbot-nginx'
$apache_plugin = 'certbot-apache'
}
+ 'FreeBSD': {
+ $nginx_plugin = 'py38-certbot-nginx'
+ $apache_plugin = 'py38-certbot-apache'
+ }
}
case $provider {
@@ -43,7 +65,6 @@ class profiles::letsencrypt (
manage_cron => true,
plugin => $plugin,
additional_args => [ '--quiet', ],
- # pre_hook_commands => [ 'systemctl stop nginx.service', ],
post_hook_commands => [ $post_hook, ],
}
}