72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
|
# File 'manifests/pwquality.pp', line 72
class pam::pwquality (
Stdlib::Absolutepath $config_file = '/etc/security/pwquality.conf',
String[1] $config_file_owner = 'root',
String[1] $config_file_group = 'root',
Stdlib::Filemode $config_file_mode = '0644',
Optional[Stdlib::Filesource] $config_file_source = undef,
String[1] $config_file_template = 'pam/pwquality.conf.erb',
Stdlib::Absolutepath $config_d_dir = '/etc/security/pwquality.conf.d',
String[1] $config_d_dir_owner = 'root',
String[1] $config_d_dir_group = 'root',
Stdlib::Filemode $config_d_dir_mode = '0755',
Boolean $purge_config_d_dir = true,
Optional[Variant[String[1], Array[String[1]]]] $purge_config_d_dir_ignore = undef,
Integer[0] $difok = 1,
Integer[6] $minlen = 8,
Integer $dcredit = 0,
Integer $ucredit = 0,
Integer $lcredit = 0,
Integer $ocredit = 0,
Integer[0] $minclass = 0,
Integer[0] $maxrepeat = 0,
Integer[0] $maxsequence = 0,
Integer[0] $maxclassrepeat = 0,
Integer[0] $gecoscheck = 0,
Integer[0] $dictcheck = 1,
Integer[0] $usercheck = 1,
Integer[0] $usersubstr = 0,
Integer[0] $enforcing = 1,
Optional[Array[String[1]]] $badwords = undef,
Optional[Stdlib::Absolutepath] $dictpath = undef,
Integer[0] $retry = 1,
Optional[Boolean] $enforce_for_root = undef,
Optional[Boolean] $local_users_only = undef,
) {
include pam
if $config_file_source {
$_config_file_content = undef
} else {
$_config_file_content = template($config_file_template)
}
file { 'pwquality.conf':
ensure => 'file',
path => $config_file,
owner => $config_file_owner,
group => $config_file_group,
mode => $config_file_mode,
source => $config_file_source,
content => $_config_file_content,
require => Package[$pam::package_name],
}
file { 'pwquality.conf.d':
ensure => 'directory',
path => $config_d_dir,
owner => $config_d_dir_owner,
group => $config_d_dir_group,
mode => $config_d_dir_mode,
purge => $purge_config_d_dir,
recurse => $purge_config_d_dir,
ignore => $purge_config_d_dir_ignore,
require => Package[$pam::package_name],
}
}
|