]> gitweb.fluxo.info Git - puppet-sshd.git/commitdiff
refactored the whole module
authormh <mh@d66ca3ae-40d7-4aa7-90d4-87d79ca94279>
Fri, 29 Feb 2008 12:09:18 +0000 (12:09 +0000)
committermh <mh@d66ca3ae-40d7-4aa7-90d4-87d79ca94279>
Fri, 29 Feb 2008 12:09:18 +0000 (12:09 +0000)
git-svn-id: https://svn/ipuppet/trunk/modules/sshd@906 d66ca3ae-40d7-4aa7-90d4-87d79ca94279

manifests/init.pp

index b2adaedf019f1aa6e3f05fcb38bb3cc26fc7f209..6f8361b0b152da4dd691188b52f8cbe057fcee4e 100644 (file)
@@ -42,33 +42,29 @@ class sshd {
 
                }
        }
-}
 
-define sshd::sshd_config(
-    $source = ''       
-){
-       $real_source = $source ? {
-               '' => "${operatingsystem}_normal.erb",
-               default => $source,
+       $real_sshd_config_source = $sshd_config_source ? {
+           '' => "sshd/sshd_config/${operatingsystem}_normal.erb",
+       default => $source,
        }
 
     notice("sshd_allowed_users is set to ${sshd_allowed_users}")
 
     $real_sshd_allowed_users = $sshd_allowed_users ? {
         ''  => 'root',
-           default => $sshd_allowed_users,
+       default => $sshd_allowed_users,
     }
 
-       file { 'sshd_config':
+    file { 'sshd_config':
         path => '/etc/ssh/sshd_config',
         owner => root,
         group => 0,
         mode => 600,
-        content => template("sshd/sshd_config/${real_source}"),
-               notify => $operatingsystem ? { 
-                       openbsd => Exec[sshd_refresh],
-                       default => Service[sshd],
-               },
+        content => template("${real_sshd_config_source}"),
+       notify => $operatingsystem ? { 
+               openbsd => Exec[sshd_refresh],
+                   default => Service[sshd],
+       },
     }
 }