diff options
author | Micah Anderson <micah@riseup.net> | 2009-07-09 12:15:10 -0400 |
---|---|---|
committer | Micah Anderson <micah@riseup.net> | 2009-07-09 12:15:10 -0400 |
commit | 2c3f632e902d10780dcf9b24914e963ef6520af2 (patch) | |
tree | 8f241b3aec57ed40d26964ed2ce57ca0cece4d27 /manifests | |
parent | d86ec97ab0d15c00d53a61fbac4edde70724486f (diff) | |
download | puppet-sshd-2c3f632e902d10780dcf9b24914e963ef6520af2.tar.gz puppet-sshd-2c3f632e902d10780dcf9b24914e963ef6520af2.tar.bz2 |
fix previous change which took the client/server packages out of the linux class
and instead allow for a version change through an if variable. thanks ng!
Diffstat (limited to 'manifests')
-rw-r--r-- | manifests/client.pp | 14 | ||||
-rw-r--r-- | manifests/init.pp | 15 |
2 files changed, 16 insertions, 13 deletions
diff --git a/manifests/client.pp b/manifests/client.pp index 47340b8..d473e3c 100644 --- a/manifests/client.pp +++ b/manifests/client.pp @@ -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', } diff --git a/manifests/init.pp b/manifests/init.pp index ee233db..386bd77 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -28,6 +28,13 @@ # $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], } |