diff options
author | mh <mh@d66ca3ae-40d7-4aa7-90d4-87d79ca94279> | 2008-02-29 12:09:18 +0000 |
---|---|---|
committer | mh <mh@d66ca3ae-40d7-4aa7-90d4-87d79ca94279> | 2008-02-29 12:09:18 +0000 |
commit | 87e586658bf70f8263eaf77052bc929472b5e9f6 (patch) | |
tree | da7d50d7c6cbd57cb71b8837c88f4e26b35f70da /manifests/init.pp | |
parent | 5076f8a68d1e17578d2d830c48a77d57ef9613e3 (diff) | |
download | puppet-sshd-87e586658bf70f8263eaf77052bc929472b5e9f6.tar.gz puppet-sshd-87e586658bf70f8263eaf77052bc929472b5e9f6.tar.bz2 |
refactored the whole module
git-svn-id: https://svn/ipuppet/trunk/modules/sshd@906 d66ca3ae-40d7-4aa7-90d4-87d79ca94279
Diffstat (limited to 'manifests/init.pp')
-rw-r--r-- | manifests/init.pp | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/manifests/init.pp b/manifests/init.pp index b2adaed..6f8361b 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -42,33 +42,29 @@ class sshd { } } -} -define sshd::sshd_config( - $source = '' -){ - $real_source = $source ? { - '' => "${operatingsystem}_normal.erb", - default => $source, + $real_sshd_config_source = $sshd_config_source ? { + '' => "sshd/sshd_config/${operatingsystem}_normal.erb", + default => $source, } notice("sshd_allowed_users is set to ${sshd_allowed_users}") $real_sshd_allowed_users = $sshd_allowed_users ? { '' => 'root', - default => $sshd_allowed_users, + default => $sshd_allowed_users, } - file { 'sshd_config': + file { 'sshd_config': path => '/etc/ssh/sshd_config', owner => root, group => 0, mode => 600, - content => template("sshd/sshd_config/${real_source}"), - notify => $operatingsystem ? { - openbsd => Exec[sshd_refresh], - default => Service[sshd], - }, + content => template("${real_sshd_config_source}"), + notify => $operatingsystem ? { + openbsd => Exec[sshd_refresh], + default => Service[sshd], + }, } } |