/
sshd.pp
47 lines (37 loc) · 1.09 KB
/
sshd.pp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
class jboss::sshd inherits base::sshd {
#
# Class with all jboss related ssh changes
#
$loginGroups += [ "jbossusers", "jbossadmins", "buildusers" ]
# We must redefine the template to force the loginGroups change
File["/etc/ssh/sshd_config"] {
content => template($sshd_config_template),
}
}
class base::sshd {
#
# Class with all base system configurations for default install
#
# Define groups that have access to the server and the template to use
$loginGroups = ["unixadmins", "linuxadmins"]
$sshd_config_template = "base/etc/ssh/sshd_config"
file {
'/etc/ssh/sshd_config':
# name => $operatingsystem ? {
# default => "/etc/ssh/sshd_config",
# },
mode => 644,
group => sys,
owner => root,
content => template($sshd_config_template);
}
service {
# Enable remote login services
"ssh":
# name => $operatingsystem ? {
# default => "ssh",
# },
ensure => running,
subscribe => File["/etc/ssh/sshd_config"];
}
}