]> gitweb.fluxo.info Git - puppet-nodo.git/commitdiff
Using hiera for ssh parameters
authorSilvio Rhatto <rhatto@riseup.net>
Fri, 25 Jan 2013 00:21:00 +0000 (22:21 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Fri, 25 Jan 2013 00:21:00 +0000 (22:21 -0200)
manifests/nodo.pp

index ed8668a336ac2e09b5a5bf1ee38f8c9b72fd1048..67d8f7ca99ee5bf08ee62f388fd9f66be5b5eefb 100644 (file)
@@ -99,31 +99,20 @@ class nodo {
     }
   }
 
-  # Default SSH configuration
-  $sshd_password_authentication = "yes"
-  $sshd_shared_ip               = "yes"
-  $sshd_tcp_forwarding          = "yes"
-  $sshd_hardened_ssl            = "yes"
-  $sshd_print_motd              = "yes"
-
   # SSH Server
   #
-  # We need to restrict listen address so multiple instances
-  # can live together in the same physical host.
+  # We need to restrict listen address by default so multiple
+  # instances can live together in the same physical host.
   #
-  case $sshd_listen_address {
-    '': { $sshd_listen_address = [ "$ipaddress", '127.0.0.1' ] }
-  }
-
   class { 'sshd':
-    listen_address          => $sshd_listen_address,
-    password_authentication => $sshd_password_authentication,
-    shared_ip               => $sshd_shared_ip,
-    tcp_forwarding          => $sshd_tcp_forwarding,
-    hardened_ssl            => $sshd_hardened_ssl,
-    print_motd              => $sshd_print_motd,
-    ports                   => $sshd_ports,
-    use_pam                 => $sshd_use_pam,
+    listen_address          => hiera('nodo::sshd_listen_address',          [ "$ipaddress", '127.0.0.1' ]),
+    password_authentication => hiera('nodo::sshd_password_authentication', 'yes'),
+    shared_ip               => hiera('nodo::sshd_shared_ip',               'yes'),
+    tcp_forwarding          => hiera('nodo::sshd_tcp_forwarding',          'yes'),
+    hardened_ssl            => hiera('nodo::sshd_hardened_ssl',            'yes'),
+    print_motd              => hiera('nodo::sshd_print_motd',              'yes'),
+    ports                   => hiera('nodo::sshd_ports',                   [ 22 ]),
+    use_pam                 => hiera('nodo::sshd_use_pam',                 'no'),
   }
 
   file { "/etc/hostname":