-
Notifications
You must be signed in to change notification settings - Fork 1
/
params.pp
88 lines (84 loc) · 2.09 KB
/
params.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
class shadow::params {
$pass_warn_age_default='7'
if(hiera('eypshadow::hardening', false))
{
#hardening = true
$pass_max_days_default='90'
$pass_min_days_default='7'
}
else
{
$pass_max_days_default='99999'
$pass_min_days_default='0'
}
$encrypt_method_default='SHA512'
case $::osfamily
{
'redhat':
{
$package_name='shadow-utils'
$maildir_default = '/var/spool/mail'
$pass_min_len_default='5'
case $::operatingsystemrelease
{
/^[5-6].*$/:
{
$sys_uid_min_default = undef
$sys_uid_max_default = undef
$sys_gid_min_default = undef
$sys_gid_max_default = undef
}
/^7.*$/:
{
$sys_uid_min_default = '201'
$sys_uid_max_default = '999'
$sys_gid_min_default = '201'
$sys_gid_max_default = '999'
}
default: { fail("Unsupported RHEL/CentOS version! - ${::operatingsystemrelease}") }
}
}
'Debian':
{
$pass_min_len_default=undef
case $::operatingsystem
{
'Ubuntu':
{
case $::operatingsystemrelease
{
/^1[468].*$|^20.*$/:
{
$package_name=[ 'passwd', 'login' ]
$maildir_default = '/var/mail'
#TODO sys_gid_min_default ...
}
default: { fail("Unsupported Ubuntu version! - ${::operatingsystemrelease}") }
}
}
'Debian': { fail('Unsupported') }
default: { fail('Unsupported Debian flavour!') }
}
}
'Suse':
{
case $::operatingsystem
{
'SLES':
{
case $::operatingsystemrelease
{
'11.3':
{
$package_name='pwdutils'
#TODO variables login.defs
}
default: { fail("Unsupported operating system ${::operatingsystem} ${::operatingsystemrelease}") }
}
}
default: { fail("Unsupported operating system ${::operatingsystem}") }
}
}
default: { fail('Unsupported OS!') }
}
}