diff options
author | duritong <peter.meier+github@immerda.ch> | 2014-02-01 06:52:23 -0800 |
---|---|---|
committer | duritong <peter.meier+github@immerda.ch> | 2014-02-01 06:52:23 -0800 |
commit | dfc6d99c931ae9cba373903b4f9da94ca7db41c1 (patch) | |
tree | f83dcf203e6d3132a29b7c56974eeb1139112e18 /manifests | |
parent | aee6885940cad29ff4ab7437e89c394bc1c19a46 (diff) | |
parent | bf425e96b1acc9c17b51600aeecd34a1d91b62e7 (diff) | |
download | puppet-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.pp | 1 | ||||
-rw-r--r-- | manifests/client/base.pp | 7 | ||||
-rw-r--r-- | manifests/debian.pp | 12 | ||||
-rw-r--r-- | manifests/init.pp | 4 |
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, |