summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormh <mh@d66ca3ae-40d7-4aa7-90d4-87d79ca94279>2007-12-27 15:42:16 +0000
committermh <mh@d66ca3ae-40d7-4aa7-90d4-87d79ca94279>2007-12-27 15:42:16 +0000
commitddb169a36e297d4a9324495cc6b35eb9be5ea0ef (patch)
tree9e6f580e1a69f0c523837bd4c37af2b668003738
parenta1e8a891019a1644fb046a2d7438164ae55d6097 (diff)
moved sshd to templates so they are cpable of having different allowed_users
git-svn-id: https://svn/ipuppet/trunk/modules/sshd@330 d66ca3ae-40d7-4aa7-90d4-87d79ca94279
-rw-r--r--manifests/init.pp7
-rw-r--r--templates/sshd_config/CentOS_normal.erb (renamed from files/sshd_config/CentOS_normal)2
-rw-r--r--templates/sshd_config/Gentoo_normal.erb (renamed from files/sshd_config/Gentoo_normal)2
3 files changed, 6 insertions, 5 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index fc6547c..e10a583 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -26,10 +26,11 @@ class sshd {
}
define sshd::sshd_config (
- $source = ""
+ $source = "",
+ $allowed_users => 'root'
){
$real_source = $source ? {
- '' => "${operatingsystem}_normal",
+ '' => "${operatingsystem}_normal.erb",
default => $source,
}
@@ -38,7 +39,7 @@ define sshd::sshd_config (
owner => root,
group => 0,
mode => 600,
- source => "puppet://$server/sshd/sshd_config/$real_source",
+ source => template("sshd/sshd_config/$real_source"),
notify => Service[sshd],
}
}
diff --git a/files/sshd_config/CentOS_normal b/templates/sshd_config/CentOS_normal.erb
index 7b8ebcc..6544cbd 100644
--- a/files/sshd_config/CentOS_normal
+++ b/templates/sshd_config/CentOS_normal.erb
@@ -115,4 +115,4 @@ X11Forwarding no
# override default of no subsystems
Subsystem sftp /usr/libexec/openssh/sftp-server
-AllowUsers root
+AllowUsers <%= allowed_users %>
diff --git a/files/sshd_config/Gentoo_normal b/templates/sshd_config/Gentoo_normal.erb
index aec8c07..bfcfb49 100644
--- a/files/sshd_config/Gentoo_normal
+++ b/templates/sshd_config/Gentoo_normal.erb
@@ -115,4 +115,4 @@ Subsystem sftp /usr/lib/misc/sftp-server
# AllowTcpForwarding no
# ForceCommand cvs server
-AllowUsers root
+AllowUsers <%= allowed_users %>