]> gitweb.fluxo.info Git - puppet-sshd.git/commitdiff
Changes for puppet 4 compatibility
authorSilvio Rhatto <rhatto@riseup.net>
Mon, 5 Jun 2017 22:07:25 +0000 (19:07 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Mon, 5 Jun 2017 22:07:25 +0000 (19:07 -0300)
manifests/init.pp

index b4157418296e9d15b47e219c5f2ca48d05ee36aa..e3f87569ef2137d799b3527c974b476261f275d6 100644 (file)
@@ -28,16 +28,16 @@ class sshd(
   $hostbased_authentication = 'no',
   $permit_empty_passwords = 'no',
   $authorized_keys_file = $::osfamily ? {
-    Debian => $::lsbmajdistrelease ? {
+    'Debian' => $::lsbmajdistrelease ? {
       6       => '%h/.ssh/authorized_keys',
       default => '%h/.ssh/authorized_keys %h/.ssh/authorized_keys2',
     },
-    RedHat => $::operatingsystemmajrelease ? {
+    'RedHat' => $::operatingsystemmajrelease ? {
       5       => '%h/.ssh/authorized_keys',
       6       => '%h/.ssh/authorized_keys',
       default => '%h/.ssh/authorized_keys %h/.ssh/authorized_keys2',
     },
-    OpenBSD => '%h/.ssh/authorized_keys',
+    'OpenBSD' => '%h/.ssh/authorized_keys',
     default => '%h/.ssh/authorized_keys %h/.ssh/authorized_keys2',
   },
   $hardened = 'no',
@@ -50,8 +50,9 @@ class sshd(
   $sshkey_ipaddress = $::ipaddress,
   $manage_client = true,
   $hostkey_type = versioncmp($::ssh_version, '6.5') ? {
-    /(^1|0)/ => [ 'rsa', 'ed25519' ],
-    /-1/    => [ 'rsa', 'dsa' ]
+     0 => [ 'rsa', 'ed25519' ],
+     1 => [ 'rsa', 'ed25519' ],
+    -1 => [ 'rsa', 'dsa' ]
   },
   $use_storedconfigs = true
 ) {