]> gitweb.fluxo.info Git - puppet-sshd.git/commitdiff
fix previous change which took the client/server packages out of the linux class
authorMicah Anderson <micah@riseup.net>
Thu, 9 Jul 2009 16:15:10 +0000 (12:15 -0400)
committerMicah Anderson <micah@riseup.net>
Thu, 9 Jul 2009 16:15:10 +0000 (12:15 -0400)
and instead allow for a version change through an if variable. thanks ng!

manifests/client.pp
manifests/init.pp

index 47340b8860813238fd2d296b291c9ee011e3ba0c..d473e3c808722121ef6b21e007e10a9dbb8e0af8 100644 (file)
@@ -14,14 +14,6 @@ class sshd::client {
 
 class sshd::client::base {
 
-  case $sshd_ensure_version {
-    '': { $sshd_ensure_version = "present" }
-  }
-  
-  package{openssh-clients:
-    ensure => $sshd_ensure_version,
-  }
-
   # this is needed because the gid might have changed
   file { '/etc/ssh/ssh_known_hosts':
     mode => 0644, owner => root, group => 0;
@@ -32,9 +24,13 @@ class sshd::client::base {
 }
 
 class sshd::client::linux inherits sshd::client::base {
+     if $ssh_ensure_version == '' { $ssh_ensure_version = 'installed' }
+     package {'openssh-clients':
+         ensure => $ssh_ensure_version,
+     }
 }
 
-class sshd::client::debian inherits sshd::client::linux {
+class sshd::client::debian inherits sshd::client::linux {  
     Package['openssh-clients']{
         name => 'openssh-client',
     }
index ee233db53e04df60b11f5df1b1a4ee01d1bebd1f..386bd7783d946290db4bb5aed97972cd54c0ba40 100644 (file)
 # $sshd_use_pam = yes
 # include sshd::debian
 #
+# If you need to install a version of the ssh daemon or client package other than
+# the default one that would be installed by 'ensure => installed', then you can
+# set the following variables:
+#
+# $sshd_ensure_version = "1:5.2p2-6"
+# $ssh_ensure_version = "1:5.2p2-6"
+#
 # The following is a list of the currently available variables:
 #
 # sshd_listen_address:          specify the addresses sshd should listen on
@@ -212,10 +219,6 @@ class sshd::base {
     '': { $sshd_ensure_version = "present" }
   }
 
-  package{openssh:
-    ensure => $sshd_ensure_version,
-  }
-  
   file { 'sshd_config':
     path => '/etc/ssh/sshd_config',
     owner => root,
@@ -260,6 +263,10 @@ class sshd::base {
 }
 
 class sshd::linux inherits sshd::base {
+  if $sshd_ensure_version == '' { $sshd_ensure_version = 'installed' }
+     package {'openssh':
+         ensure => $sshd_ensure_version,
+  }
   File[sshd_config]{
     require +> Package[openssh],
   }