-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathREADME_Parameters
More file actions
399 lines (326 loc) · 11.8 KB
/
README_Parameters
File metadata and controls
399 lines (326 loc) · 11.8 KB
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
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
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
Naming Standards for Parameters/Hiera names
Usage patterns: With a class declaration
class { $module:
$parameter => $value,
}
class { 'openssh':
file_template => 'site/openssh/sshd_config.erb',
}
Usage patterns: With Hiera
Behavior of: hiera ( "$module::$parameter" )
Configured like:
{
"openssh::file_template" : site/openssh/sshd_config.erb’,
}
Manage removal of the resources provided by the module:
# [*ensure*]
# String. Default: present
# Manages package installation and class resources. Possible values:
# * 'present' - Install package, ensure files are present.
# * 'absent' - Stop service and remove package and managed files
#
Manage auditing and noop
# [*audit*]
# String or array. Default: undef.
# Applies audit metaparameter to managed files.
# Ref: http://docs.puppetlabs.com/references/latest/metaparameter.html#audit
# Possible values:
# * '<attribute>' - A name of the attribute to audit.
# * [ '<attr1>' , '<attr2>' ] - An array of attributes.
# * 'all' - Audit all the attributes.
#
# [*noop*]
# Boolean. Default: false.
# Set noop metaparameter to true for all the resources managed by the module.
# If true no real change is done is done by the module on the system.
#
Manage Package(s)
# [*package*]
# String. Default: Defined by the module
# Name of the package to install. Can be an array.
#
# [*package_version*]
# String. Default: undef
# If set, the defined package version is installed. Possible values:
# * 'x.x.x' - The version to install
# * 'latest' - Ensure you have the latest available version.
Manage Service(s)
# [*service*]
# String. Default: Defined by the module
# Name of the service to manage.
#
# [*service_ensure*]
# String. Default: running
# Define the current service status.
# Possible values: running|true|stopped|false
#
# [*service_enable*]
# String. Default: true
# Define the service status at boot time.
# Possible values: true|false
#
# [*service_subscribe*]
# String. Default: Defined by the module.
# By default the service is restarted after confguration changes.
# Define the service subscribe option or set to 'undef' for no
# automatic services restarts triggered by configuration changes.
#
Where is needed to manage the service initializion script
(both the script itself (init, upstart..) and its config file):
# [*init_script_file*]
# String. Default: undef.
# Path of the initialization script (ie: /etc/init.d/stdmod)
#
# [*init_script_file_template*]
# String. Default: undef.
#
# [*init_script_file_options_hash*]
# Hash. Default undef. Needs: 'initscript_file_template'.
# An hash of custom options to be used in templates to manage any key pairs of
# arbitrary settings.
#
# [*init_options_file*]
# String. Default: undef.
# Path of the config file for initialization script (ie: /etc/default/stdmod)
#
# [*init_options_file_template*]
# String. Default: undef.
#
# [*init_options_file_options_hash*]
# Hash. Default undef. Needs: 'initscript_file_template'.
# An hash of custom options to be used in templates to manage any key pairs of
# arbitrary settings.
#
Manage the [main] configuration file(s)
# [*file*]
# String. Default: Defined in stdmod::params.
# Path of the [main] configuration file.
# [*file_source*]
# String or Array. Default: undef. Alternative to 'file_template'.
# Sets the content of source parameter for main configuration file.
# If defined, stdmod main config file will have the param: source => $source
# Example: source => 'puppet:///modules/site/stdmod/stdmod.conf',
#
# [*file_template*]
# String. Default: undef. Alternative to 'file_source'.
# Sets the path to the template to use as content for main configuration file
# If defined, stdmod main config file has: content => content("$template")
# Example: template => 'site/stdmod.conf.erb',
#
# [*file_options_hash*]
# Hash. Default undef. Needs: 'file_template'.
# An hash of custom options to be used in templates to manage any key pairs of
# arbitrary settings. Usually this is implemented to map directly to configuration statements.
# Special values MUST be documented in the module.
#
Manage the whole configuration directory
# [*dir*]
# String. Default: Defined in stdmod::params.
# Path of the configuration dir.
#
# [*dir_source*]
# String or Array. Default: undef
# If set, the main configuration dir is managed and its contents retrieved
# from the specified source.
# Example: dir_source => 'puppet:///modules/site/stdmod/conf.d/',
#
# [*dir_recurse*]
# String. Default: true. Needs 'dir_source'.
# Sets recurse parameter on the main configuration directory, if managed.
# Possible values:
# * 'true|int' - Regular recursion on both remote and local dir structure
# * 'remote' - Descends recursively into the remote dir but not the local dir
# * 'false - No recursion
#
# [*dir_purge*]
# Boolean. Default: false
# If set to true it removes all the files on the configuration directory that are not
# deployed via Puppet (with params like file_source, file_template and dir_source)
# Set it to true when you want to be sure that Puppet manages completely
# the configuration directory.
Manage home/data/other (common) module dir paths and parameters where needed
# [*home_dir*]
# [*data_dir*]
# [*data_dir_owner*]
# [*data_dir_mode*]
# [*log_dir*]
# [*bin_dir*]
# [*lib_dir*]
# [*confd_dir*]
Manage other common files paths and parameters, where needed
# [*log_file*]
# [*log_file_owner*]
# [*log_file_mode*]
# [*install_script_file*]
# [*install_script_file_source*]
# [*install_response_file*]
# [*install_response_file_source*]
# [*install_response_file_template*]
# [*init_script_file*]
# [*init_config_file*]
Samples for specific modules
# [*hba_file*]
# [*hba_file_template*]
#
Manage any extra configuration file, service or package with a common prefix
(here ‘other_’)
# [*other_file*]
# String. Default: Defined in stdmod::params.
# Path of the [main] configuration file.
# [*other_file_source*]
# String or Array. Default: undef. Alternative to 'template'.
# Sets the content of source parameter for otherfile configuration file.
# If defined, otherfilenfig file will have the param: source => $source
# Example: source => 'puppet:///modules/site/stdmod/stdmod.conf',
#
# [*other_file_template*]
# String. Default: undef. Alternative to 'source'.
# Sets the path to the template to use as content for main configuration file
# If defined, stdmod main config file has: content => content("$template")
# Example: template => 'site/stdmod.conf.erb',
#
# [*other_file_options_hash*]
# Hash. Default undef. Needs: 'template'.
# An hash of custom options to be used in templates to manage any key pairs of
# arbitrary settings.
#
Manage interoperabilty with 3rd party modules resources
# [*dependency_class*]
# String. Default: stdmod::dependency
# Name of a class that contains resources needed by this module but provided
# by external modules. You may leave the default value to keep the
# default dependencies as declared in stdmod/manifests/dependency.pp
# or define a custom class name where the same resources are provided
# with custom ways or via other modules.
# Set to undef to not include any dependency class.
#
Add extra custom resources related to the class or define
# [*my_class*]
# String. Default undef.
# Name of a custom class to autoload to manage module's customizations
# If defined, stdmod class will automatically "include $my_class"
# Example: my_class => 'site::my_stdmod',
#
# [*resources_hash*]
# Hash. Default undef.
# A single hash that contains the complete list of resources to create (with both parameters and types of resources to create)
# The module has to manage and split the hash to feed the create_resources function.
Manage alternative installation options
# [*install_mode*]
# Kind of installation to attempt:
# - package : Installs stdmod using the OS common packages
# - upstream : Installs (compiled) stdmod using the upstream source
#
# [*install_source*]
# URL to retrieve the upstream package.
# Used if install => "upstream"
# Default is from upstream developer site. Update the version when needed.
#
# [*install_destination*]
# Path where source package is exploded.
# Used if install => "upstream"
#
# [*install_precommand*]
# Optional custom command to execute before installing the source tarball/zip.
# Used if install => "upstream"
# Check stdmod/manifests/params.pp before overriding the default settings
#
# [*install_postcommand*]
# A custom command to execute after installing the source tarball/zip.
# Used if install => "upstream"
# Check stdmod/manifests/params.pp before overriding the default settings
#
Manage monitoring
# [*monitor_class*]
# [*monitor*]
# Set to 'true' to enable monitoring of the services provided by the module
# Can be defined also by the (top scope) variables $graylog2_monitor
# and $monitor
#
# [*monitor_tool*]
# Define which tool(s) to use for monitoring
#
# [*monitor_host*]
# The Ip address or hostname to use as a target for monitoring tools.
# Default is the fact $ipaddress
# [*monitor_port*]
# [*monitor_protocol*]
# [*monitor_url*]
# [*monitor_process*]
# [*monitor_service*]
# [*monitor_config_hash*]
Manage firewalling
# [*firewall_class*]
#
# [*firewall*]
# Set to 'true' to enable firewalling of the services provided by the module
#
# [*firewall_src*]
# Define which source ip/net allow for firewalling. Default: 0.0.0.0/0
#
# [*firewall_dst*]
# Define which destination ip to use for firewalling. Default: $ipaddress
Parameters for defines that create files
# [*ensure*]
# String. Default: present
# Manages configfile presence. Possible values:
# * 'present' - Install package, ensure files are present.
# * 'absent' - Stop service and remove package and managed files
#
# [*file_template*]
# String. Default: Provided by the module.
# Sets the path of a custom template to use as content of configfile
# If defined, configfile file has: content => content("$template")
# Example: template => 'site/configfile.conf.erb',
#
# [*file_options_hash*]
# Hash. Default undef. Needs: 'template'.
# An hash of custom options to be used in templates to manage any key pairs of
# arbitrary settings.
#
define stdmod::configfile (
$ensure = present,
$file_template = 'stdmod/configfile.erb' ,
$file_options_hash = {} ,
$ensure = present ) {
Parameters for defines that execute commands
# [*exec_refreshonly*]
# Boolen. Optional. Default: true
# Defines the logic of execution of the script when Puppet runs.
# Maps to the omonymous Exec type argument.
#
# [*exec_creates*]
# String. Optional. Default: undef
# Defines the logic of execution of the script when Puppet runs.
# Maps to the omonymous Exec type argument.
#
# [*exec_onlyif*]
# String. Optional. Default: undef
# Defines the logic of execution of the script when Puppet runs.
# Maps to the omonymous Exec type argument.
#
# [*exec_unless*]
# String. Optional. Default: undef
# Defines the logic of execution of the script when Puppet runs.
# Maps to the omonymous Exec type argument.
# [*exec_environment*]
# Define any additional environment variables to be used with the
# exec commands. Note that if you use this to set PATH, it will
# override the path attribute. Multiple environment variables
# should be specified as an array.
# [*exec_path*]
# Define any additional environment variables to be used with the
# exec commands. Note that if you use this to set PATH, it will
# override the path attribute. Multiple environment variables
# should be specified as an array.
# [*exec_options_hash*]
Generic parameters to manage users creation, where needed
# [*user*]
# [*user_uid*]
# [*user_gid*]
# [*user_groups*]
# [*user_home*]
# [*user_create*]
# Boolean. Default: true
# Set to true if you want the module to create the process user of stdmod
#