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
This commit is contained in:
parent
f44776cbbf
commit
dfebe2a9b5
2 changed files with 22 additions and 7 deletions
|
@ -13,13 +13,22 @@ class sshd::client {
|
||||||
}
|
}
|
||||||
|
|
||||||
class sshd::client::base {
|
class sshd::client::base {
|
||||||
# this is needed because the gid might have changed
|
|
||||||
file { '/etc/ssh/ssh_known_hosts':
|
case $sshd_ensure_version {
|
||||||
mode => 0644, owner => root, group => 0;
|
'': { $sshd_ensure_version = "present" }
|
||||||
}
|
}
|
||||||
|
|
||||||
# Now collect all server keys
|
package{openssh-clients:
|
||||||
Sshkey <<||>>
|
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 {
|
class sshd::client::linux inherits sshd::client::base {
|
||||||
|
|
|
@ -208,6 +208,12 @@ class sshd::base {
|
||||||
case $sshd_tail_additional_options {
|
case $sshd_tail_additional_options {
|
||||||
'': { $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':
|
file { 'sshd_config':
|
||||||
|
|
Loading…
Reference in a new issue