]> gitweb.fluxo.info Git - puppet-sshd.git/commitdiff
not all versions support the new default
authormh <mh@immerda.ch>
Tue, 10 Jun 2014 16:29:47 +0000 (18:29 +0200)
committermh <mh@immerda.ch>
Tue, 10 Jun 2014 16:29:47 +0000 (18:29 +0200)
manifests/init.pp

index d005d60f09e18125d92ce38b26bf14599009df68..6b9c66a73034ed8119c8da893b189058593a1afb 100644 (file)
@@ -26,7 +26,17 @@ class sshd(
   $rhosts_rsa_authentication = 'no',
   $hostbased_authentication = 'no',
   $permit_empty_passwords = 'no',
-  $authorized_keys_file = '%h/.ssh/authorized_keys %h/.ssh/authorized_keys2',
+  $authorized_keys_file = $::osfamily ? {
+    Debian => $::operatingsystemmajrelease ? {
+      6       => '%h/.ssh/authorized_keys',
+      default => '%h/.ssh/authorized_keys %h/.ssh/authorized_keys2',
+    },
+    RedHat => $::operatingsystemmajrelease ? {
+      5       => '%h/.ssh/authorized_keys',
+      default => '%h/.ssh/authorized_keys %h/.ssh/authorized_keys2',
+    },
+    default => '%h/.ssh/authorized_keys %h/.ssh/authorized_keys2',
+  },
   $hardened_ssl = 'no',
   $sftp_subsystem = '',
   $head_additional_options = '',