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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
|
# File 'manifests/master.pp', line 86
class puppet::master (
$autosign = false,
$autosign_domains = [],
$autosign_file = $::puppet::defaults::autosign_file,
$autosign_method = 'file',
$basemodulepath = $::puppet::defaults::basemodulepath,
$deep_merge_version = 'installed',
$env_owner = 'puppet',
$environmentpath = $::puppet::defaults::environmentpath,
$environment_timeout = '0',
$eyaml_keys = false,
$future_parser = false,
$hiera_backends = $::puppet::defaults::hiera_backends,
$hiera_eyaml_key_directory = $::puppet::defaults::hiera_eyaml_key_directory,
$hiera_eyaml_pkcs7_private_key = 'private_key.pkcs7.pem',
$hiera_eyaml_pkcs7_public_key = 'public_key.pkcs7.pem',
$hiera_eyaml_pkcs7_private_key_file = undef,
$hiera_eyaml_pkcs7_public_key_file = undef,
$hiera_eyaml_version = 'installed',
$manage_deep_merge_package = false,
$manage_hiera_eyaml_package = true,
$hiera_hierarchy = [
'node/%{::clientcert}',
'env/%{::environment}',
'global'],
$hiera_merge_behavior = undef,
$hieradata_path = $::puppet::defaults::hieradata_path,
$java_ram = '2g',
$manage_hiera_config = true,
$passenger_max_pool_size = '12',
$passenger_max_requests = '0',
$passenger_pool_idle_time = '1500',
$passenger_stat_throttle_rate = '120',
$puppet_fqdn = $::fqdn,
$puppet_version = 'installed',
$report_age = '7',
$report_clean_min = '22',
$report_clean_hour = '21',
$report_clean_weekday = '0',
$server_type = $::puppet::defaults::server_type,
$server_version = 'installed',
$module_path = undef,
$pre_module_path = undef,
$r10k_version = undef,
) inherits ::puppet::defaults {
#input validation
validate_absolute_path(
$environmentpath,
$hieradata_path,
)
validate_array(
$hiera_hierarchy,
)
validate_bool(
$autosign,
$eyaml_keys,
$future_parser,
$manage_hiera_config,
)
validate_hash(
$hiera_backends
)
validate_string(
$env_owner,
$environment_timeout,
$hiera_eyaml_version,
$puppet_fqdn,
$puppet_version,
$server_version,
$passenger_max_pool_size,
$passenger_max_requests,
$passenger_pool_idle_time,
$passenger_stat_throttle_rate,
)
# add deprecation warnings
if $r10k_version != undef {
notify { 'Deprecation notice: puppet::master::r10k_version is deprecated, use puppet::profile::r10k class instead': }
}
if $module_path != undef {
notify { 'Deprecation notice: puppet::master::module_path is deprecated, use puppet::master::basemodulepath instead': }
}
if $pre_module_path != undef {
notify { 'Deprecation notice: puppet::master::pre_module_path is deprecated, use puppet::master::basemodulepath instead': }
}
if $eyaml_keys == true {
if $hiera_eyaml_pkcs7_private_key_file == undef {
notify { 'hiera_eyaml_pkcs7_private_key_file needs to be set if you want to manage your hiera eyaml keys': }
}
if $hiera_eyaml_pkcs7_public_key_file == undef {
notify { 'hiera_eyaml_pkcs7_public_key_file needs to be set if you want to manage your hiera eyaml keys': }
}
}
# check autosign methods
$autosign_methods = ['off','on','file']
validate_re($autosign_method,$autosign_methods)
# set autosign_method_interpolated to on if autosign is true
if $autosign == true {
notify { 'autosign is now managed with autosign_method. The autosign parameter is deprecated and will be removed in a future version': }
}
# check merge_behavior for hiera
if $hiera_merge_behavior {
$hiera_merge_behaviors = ['native', 'deep', 'deeper']
validate_re($hiera_merge_behavior,$hiera_merge_behaviors)
}
include ::puppet::master::install
include ::puppet::master::config
include ::puppet::master::hiera
case $server_type {
'puppetserver': {
include ::puppet::master::server
# Class['puppet::master::hiera'] ~>
# Class['puppet::master::server']
}
default: {
include ::puppet::master::passenger
# Class['puppet::master::hiera'] ~>
# Class['puppet::master::passenger']
}
}
Class['puppet::master::install'] ->
Class['puppet::master::config'] ->
Class['puppet::master::hiera']
}
|