From 2c3f632e902d10780dcf9b24914e963ef6520af2 Mon Sep 17 00:00:00 2001 From: Micah Anderson Date: Thu, 9 Jul 2009 12:15:10 -0400 Subject: 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! --- manifests/client.pp | 14 +++++--------- manifests/init.pp | 15 +++++++++++---- 2 files changed, 16 insertions(+), 13 deletions(-) (limited to 'manifests') 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], } -- cgit v1.2.3