]> gitweb.fluxo.info Git - puppet-sshd.git/commitdiff
better set the variables in the init
authormh <mh@immerda.ch>
Tue, 29 Sep 2009 21:43:42 +0000 (23:43 +0200)
committerMicah Anderson <micah@riseup.net>
Mon, 7 Dec 2009 21:04:22 +0000 (16:04 -0500)
manifests/base.pp
manifests/init.pp

index 2f2f973e4090c5c1f1fa87919f612ffd7c3e6cb2..b24997469b8143fc97ca77b212c063fedbb4e73e 100644 (file)
@@ -1,69 +1,4 @@
-class sshd::base {
-    # prepare variables to use in templates
-    case $sshd_listen_address {
-      '': { $sshd_listen_address = [ '0.0.0.0', '::' ] }
-    }
-    case $sshd_allowed_users {
-        '': { $sshd_allowed_users = '' }
-    }
-    case $sshd_allowed_groups {
-      '': { $sshd_allowed_groups = '' }
-    }
-    case $sshd_use_pam {
-        '': { $sshd_use_pam = 'no' }
-    }
-    case $sshd_permit_root_login {
-        '': { $sshd_permit_root_login = 'without-password' }
-    }
-    case $sshd_password_authentication {
-        '': { $sshd_password_authentication = 'no' }
-    }
-    case $sshd_tcp_forwarding {
-       '': { $sshd_tcp_forwarding = 'no' }
-    }
-    case $sshd_x11_forwarding {
-        '': { $sshd_x11_forwarding = 'no' }
-    }
-    case $sshd_agent_forwarding {
-       '': { $sshd_agent_forwarding = 'no' }
-    }
-    case $sshd_challenge_response_authentication {
-        '': { $sshd_challenge_response_authentication = 'no' }
-    }
-    case $sshd_pubkey_authentication {
-       '': { $sshd_pubkey_authentication = 'yes' }
-    }
-    case $sshd_rsa_authentication {
-       '': { $sshd_rsa_authentication = 'no' }
-    }
-    case $sshd_strict_modes {
-       '': { $sshd_strict_modes = 'yes' }
-    }
-    case $sshd_ignore_rhosts {
-        '': { $sshd_ignore_rhosts = 'yes' }
-    }
-    case $sshd_rhosts_rsa_authentication {
-       '': { $sshd_rhosts_rsa_authentication = 'no' }
-    }
-    case $sshd_hostbased_authentication {
-       '': { $sshd_hostbased_authentication = 'no' }
-    }
-    case $sshd_permit_empty_passwords {
-       '': { $sshd_permit_empty_passwords = 'no' }
-    }
-    case $sshd_port {
-      '': { $sshd_port = 22 }
-    }
-    case $sshd_authorized_keys_file {
-      '': { $sshd_authorized_keys_file = "%h/.ssh/authorized_keys" }
-    }
-    case $sshd_sftp_subsystem {
-        '': { $sshd_sftp_subsystem = '' }
-    }
-    case $sshd_additional_options {
-        '': { $sshd_additional_options = '' }
-    }
-      
+class sshd::base {     
     file { 'sshd_config':
         path => '/etc/ssh/sshd_config',
         owner => root,
index cece69e0c3fed35c233b2409f42f6622aa458881..8489a6a6b1a9047379aac942601f10596066522e 100644 (file)
 #                           Default: empty -> not added.
 
 class sshd {
+    # prepare variables to use in templates
+    case $sshd_listen_address {
+      '': { $sshd_listen_address = [ '0.0.0.0', '::' ] }
+    }
+    case $sshd_allowed_users {
+        '': { $sshd_allowed_users = '' }
+    }
+    case $sshd_allowed_groups {
+      '': { $sshd_allowed_groups = '' }
+    }
+    case $sshd_use_pam {
+        '': { $sshd_use_pam = 'no' }
+    }
+    case $sshd_permit_root_login {
+        '': { $sshd_permit_root_login = 'without-password' }
+    }
+    case $sshd_password_authentication {
+        '': { $sshd_password_authentication = 'no' }
+    }
+    case $sshd_tcp_forwarding {
+       '': { $sshd_tcp_forwarding = 'no' }
+    }
+    case $sshd_x11_forwarding {
+        '': { $sshd_x11_forwarding = 'no' }
+    }
+    case $sshd_agent_forwarding {
+       '': { $sshd_agent_forwarding = 'no' }
+    }
+    case $sshd_challenge_response_authentication {
+        '': { $sshd_challenge_response_authentication = 'no' }
+    }
+    case $sshd_pubkey_authentication {
+       '': { $sshd_pubkey_authentication = 'yes' }
+    }
+    case $sshd_rsa_authentication {
+       '': { $sshd_rsa_authentication = 'no' }
+    }
+    case $sshd_strict_modes {
+       '': { $sshd_strict_modes = 'yes' }
+    }
+    case $sshd_ignore_rhosts {
+        '': { $sshd_ignore_rhosts = 'yes' }
+    }
+    case $sshd_rhosts_rsa_authentication {
+       '': { $sshd_rhosts_rsa_authentication = 'no' }
+    }
+    case $sshd_hostbased_authentication {
+       '': { $sshd_hostbased_authentication = 'no' }
+    }
+    case $sshd_permit_empty_passwords {
+       '': { $sshd_permit_empty_passwords = 'no' }
+    }
+    case $sshd_port {
+      '': { $sshd_port = 22 }
+    }
+    case $sshd_authorized_keys_file {
+      '': { $sshd_authorized_keys_file = "%h/.ssh/authorized_keys" }
+    }
+    case $sshd_sftp_subsystem {
+        '': { $sshd_sftp_subsystem = '' }
+    }
+    case $sshd_additional_options {
+        '': { $sshd_additional_options = '' }
+    }
     include sshd::client 
 
     case $operatingsystem {