changeset 278:a8bf3a400712

Make Certbot package version specific Unversioned would have been nice, but it doesn't seem to work
author IBBoard <dev@ibboard.co.uk>
date Sat, 15 Feb 2020 13:12:44 +0000
parents 13825cc1ec57
children e36b7f4f85f2
files modules/website/manifests/init.pp
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/modules/website/manifests/init.pp	Sun Jan 26 12:08:03 2020 +0000
+++ b/modules/website/manifests/init.pp	Sat Feb 15 13:12:44 2020 +0000
@@ -130,7 +130,12 @@
       hour => '*/12',
       minute => '21',
     }
-    package { 'python-certbot-apache':
+    if versioncmp($operatingsystemrelease, '7') == 0 {
+        $certbot_pkg = 'python2-certbot-apache'
+    } else {
+        $certbot_pkg = 'python3-certbot-apache'
+    }
+    package { $certbot_pkg:
       ensure => installed,
     }
   }