aboutsummaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authorduritong <peter.meier+github@immerda.ch>2014-02-01 06:52:23 -0800
committerduritong <peter.meier+github@immerda.ch>2014-02-01 06:52:23 -0800
commitdfc6d99c931ae9cba373903b4f9da94ca7db41c1 (patch)
treef83dcf203e6d3132a29b7c56974eeb1139112e18 /manifests
parentaee6885940cad29ff4ab7437e89c394bc1c19a46 (diff)
parentbf425e96b1acc9c17b51600aeecd34a1d91b62e7 (diff)
downloadpuppet-sshd-dfc6d99c931ae9cba373903b4f9da94ca7db41c1.tar.gz
puppet-sshd-dfc6d99c931ae9cba373903b4f9da94ca7db41c1.tar.bz2
Merge pull request #7 from deric/more-tests
More tests
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,