summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMicah Anderson <micah@riseup.net>2009-07-07 20:55:01 -0400
committerMicah Anderson <micah@riseup.net>2009-07-07 20:55:01 -0400
commitdfebe2a9b537a63c7ff0cf4aeb6cda7a132f77a0 (patch)
tree23a2b0595c278dd87b2693e66fd388e248ff392f
parentf44776cbbf1f825e0961c6aedecf67f6652859a6 (diff)
make it possible to override what version of openssh-server and client are installed by providing the variable $sshd_ensure_version, which defaults to the previous value of present when not specified
-rw-r--r--manifests/client.pp23
-rw-r--r--manifests/init.pp6
2 files changed, 22 insertions, 7 deletions
diff --git a/manifests/client.pp b/manifests/client.pp
index 34308b4..7dfe913 100644
--- a/manifests/client.pp
+++ b/manifests/client.pp
@@ -13,13 +13,22 @@ class sshd::client {
}
class sshd::client::base {
- # this is needed because the gid might have changed
- file { '/etc/ssh/ssh_known_hosts':
- mode => 0644, owner => root, group => 0;
- }
-
- # Now collect all server keys
- Sshkey <<||>>
+
+ 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;
+ }
+
+ # Now collect all server keys
+ Sshkey <<||>>
}
class sshd::client::linux inherits sshd::client::base {
diff --git a/manifests/init.pp b/manifests/init.pp
index b7ae200..5179e08 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -208,6 +208,12 @@ class sshd::base {
case $sshd_tail_additional_options {
'': { $sshd_tail_additional_options = '' }
}
+ case $sshd_ensure_version {
+ '': { $sshd_ensure_version = "present" }
+ }
+
+ package{openssh:
+ ensure => $sshd_ensure_version,
}
file { 'sshd_config':