From 0f9315b4f348c0f6ff69feeca3606a00b1089375 Mon Sep 17 00:00:00 2001 From: mh Date: Tue, 10 Jun 2014 18:29:47 +0200 Subject: not all versions support the new default --- manifests/init.pp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/manifests/init.pp b/manifests/init.pp index d005d60..6b9c66a 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -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 = '', -- cgit v1.2.3