aboutsummaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
Diffstat (limited to 'manifests')
-rw-r--r--manifests/base.pp1
-rw-r--r--manifests/client/base.pp7
-rw-r--r--manifests/debian.pp12
-rw-r--r--manifests/init.pp4
4 files changed, 11 insertions, 13 deletions
diff --git a/manifests/base.pp b/manifests/base.pp
index ef066e0..a0f1872 100644
--- a/manifests/base.pp
+++ b/manifests/base.pp
@@ -6,6 +6,7 @@ class sshd::base {
}
file { 'sshd_config':
+ ensure => present,
path => '/etc/ssh/sshd_config',
content => $sshd_config_content,
notify => Service[sshd],
diff --git a/manifests/client/base.pp b/manifests/client/base.pp
index 6687d65..4925c2d 100644
--- a/manifests/client/base.pp
+++ b/manifests/client/base.pp
@@ -1,9 +1,10 @@
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;
+ ensure => present,
+ mode => '0644',
+ owner => root,
+ group => 0;
}
# Now collect all server keys
diff --git a/manifests/debian.pp b/manifests/debian.pp
index ced5db7..d827078 100644
--- a/manifests/debian.pp
+++ b/manifests/debian.pp
@@ -1,21 +1,13 @@
class sshd::debian inherits sshd::linux {
- # the templates for Debian need lsbdistcodename
- require lsb
-
Package[openssh]{
name => 'openssh-server',
}
- $sshd_restartandstatus = $::lsbdistcodename ? {
- etch => false,
- default => true
- }
-
Service[sshd]{
name => 'ssh',
pattern => 'sshd',
- hasstatus => $sshd_restartandstatus,
- hasrestart => $sshd_restartandstatus,
+ hasstatus => true,
+ hasrestart => true,
}
}
diff --git a/manifests/init.pp b/manifests/init.pp
index 307fc8a..fb76438 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -36,6 +36,10 @@ class sshd(
$shorewall_source = 'net'
) {
+ validate_bool($manage_shorewall)
+ validate_array($listen_address)
+ validate_array($ports)
+
class{'sshd::client':
shared_ip => $sshd::shared_ip,
ensure_version => $sshd::ensure_version,