aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 %>