summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--manifests/client.pp19
-rw-r--r--manifests/init.pp1
l---------templates/sshd_config/CentOS_Final.erb1
3 files changed, 14 insertions, 7 deletions
diff --git a/manifests/client.pp b/manifests/client.pp
index f0b05c5..34308b4 100644
--- a/manifests/client.pp
+++ b/manifests/client.pp
@@ -3,15 +3,16 @@
class sshd::client {
case $operatingsystem {
debian: { include sshd::client::debian }
- default: { include sshd::client::base }
+ default: {
+ case $kernel {
+ linux: { include sshd::client::linux }
+ default: { include sshd::client::base }
+ }
+ }
}
}
class sshd::client::base {
- package {'openssh-clients':
- ensure => installed,
- }
-
# this is needed because the gid might have changed
file { '/etc/ssh/ssh_known_hosts':
mode => 0644, owner => root, group => 0;
@@ -21,7 +22,13 @@ class sshd::client::base {
Sshkey <<||>>
}
-class sshd::client::debian inherits sshd::client::base {
+class sshd::client::linux inherits sshd::client::base {
+ package {'openssh-clients':
+ ensure => installed,
+ }
+}
+
+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 96e6d08..55a2714 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -210,7 +210,6 @@ class sshd::base {
type => ssh-rsa,
key => $sshrsakey_key,
ensure => present,
- require => Package["openssh-clients"],
}
}
}
diff --git a/templates/sshd_config/CentOS_Final.erb b/templates/sshd_config/CentOS_Final.erb
new file mode 120000
index 0000000..03246aa
--- /dev/null
+++ b/templates/sshd_config/CentOS_Final.erb
@@ -0,0 +1 @@
+CentOS.erb \ No newline at end of file