From 660ebcdc696006fb944c98ac6feee038733bb850 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Wed, 9 Feb 2022 18:27:12 +0100 Subject: Letsencrypt more OS:s. --- manifests/letsencrypt.pp | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'manifests') 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, ], } } -- cgit v1.2.3