Update stdlib and concat to 6.1.0 both
[mirror/dsa-puppet.git] / 3rdparty / modules / concat / REFERENCE.md
1 # Reference
2 <!-- DO NOT EDIT: This document was generated by Puppet Strings -->
3
4 ## Table of Contents
5
6 **Defined types**
7
8 * [`concat`](#concat): Manages a file, compiled from one or more text fragments.
9 * [`concat::fragment`](#concatfragment): Manages a fragment of text to be compiled into a file.
10
11 **Resource types**
12
13 * [`concat_file`](#concat_file): Generates a file with content from fragments sharing a common unique tag.
14 * [`concat_fragment`](#concat_fragment): Manages the fragment.
15
16 ## Defined types
17
18 ### concat
19
20 Manages a file, compiled from one or more text fragments.
21
22 #### Examples
23
24 ##### 
25
26 ```puppet
27 concat { '/tmp/concat':
28   ensure => present,
29   owner  => 'root',
30   group  => 'root',
31   mode   => '0644',
32 }
33 ```
34
35 #### Parameters
36
37 The following parameters are available in the `concat` defined type.
38
39 ##### `backup`
40
41 Data type: `Variant[Boolean, String]`
42
43 Specifies whether (and how) to back up the destination file before overwriting it. Your value gets passed on to Puppet's native file
44 resource for execution. Valid options: true, false, or a string representing either a target filebucket or a filename extension
45 beginning with ".".
46
47 Default value: 'puppet'
48
49 ##### `ensure`
50
51 Data type: `Enum['present', 'absent']`
52
53 Specifies whether the destination file should exist. Setting to 'absent' tells Puppet to delete the destination file if it exists, and
54 negates the effect of any other parameters.
55
56 Default value: 'present'
57
58 ##### `ensure_newline`
59
60 Data type: `Boolean`
61
62 Specifies whether to add a line break at the end of each fragment that doesn't already end in one.
63
64 Default value: `false`
65
66 ##### `format`
67
68 Data type: `Optional[String]`
69
70 Specify what data type to merge the fragments as. Valid options: 'plain', 'yaml', 'json', 'json-array', 'json-pretty',
71 'json-array-pretty'.
72
73 Default value: 'plain'
74
75 ##### `force`
76
77 Data type: `Optional[Boolean]`
78
79 Specifies whether to merge data structures, keeping the values with higher order. Used when format is specified as a value other than
80 'plain'.
81
82 Default value: `false`
83
84 ##### `group`
85
86 Data type: `Optional[Variant[String, Integer]]`
87
88 Specifies a permissions group for the destination file. Valid options: a string containing a group name or integer containing a gid.
89
90 Default value: `undef`
91
92 ##### `mode`
93
94 Data type: `String`
95
96 Specifies the permissions mode of the destination file. Valid options: a string containing a permission mode value in octal notation.
97
98 Default value: '0644'
99
100 ##### `order`
101
102 Data type: `Enum['alpha','numeric']`
103
104 Specifies a method for sorting your fragments by name within the destination file. You can override this setting for individual
105 fragments by adjusting the order parameter in their concat::fragment declarations.
106
107 Default value: 'alpha'
108
109 ##### `owner`
110
111 Data type: `Optional[Variant[String, Integer]]`
112
113 Specifies the owner of the destination file. Valid options: a string containing a username or integer containing a uid.
114
115 Default value: `undef`
116
117 ##### `path`
118
119 Data type: `Stdlib::Absolutepath`
120
121 Specifies a destination file for the combined fragments.
122
123 Default value: $name
124
125 ##### `replace`
126
127 Data type: `Boolean`
128
129 Specifies whether to overwrite the destination file if it already exists.
130
131 Default value: `true`
132
133 ##### `selinux_ignore_defaults`
134
135 Data type: `Optional[Boolean]`
136
137 See the file type's selinux_ignore_defaults documentention:
138 https://docs.puppetlabs.com/references/latest/type.html#file-attribute-selinux_ignore_defaults
139
140 Default value: `undef`
141
142 ##### `selrange`
143
144 Data type: `Optional[String]`
145
146 See the file type's selrange documentention: https://docs.puppetlabs.com/references/latest/type.html#file-attribute-selrange
147
148 Default value: `undef`
149
150 ##### `selrole`
151
152 Data type: `Optional[String]`
153
154 See the file type's selrole documentention: https://docs.puppetlabs.com/references/latest/type.html#file-attribute-selrole
155
156 Default value: `undef`
157
158 ##### `seltype`
159
160 Data type: `Optional[String]`
161
162 See the file type's seltype documentention: https://docs.puppetlabs.com/references/latest/type.html#file-attribute-seltype
163
164 Default value: `undef`
165
166 ##### `seluser`
167
168 Data type: `Optional[String]`
169
170 See the file type's seluser documentention: https://docs.puppetlabs.com/references/latest/type.html#file-attribute-seluser
171
172 Default value: `undef`
173
174 ##### `show_diff`
175
176 Data type: `Boolean`
177
178 Specifies whether to set the show_diff parameter for the file resource. Useful for hiding secrets stored in hiera from insecure
179 reporting methods.
180
181 Default value: `true`
182
183 ##### `validate_cmd`
184
185 Data type: `Optional[String]`
186
187 Specifies a validation command to apply to the destination file.
188
189 Default value: `undef`
190
191 ##### `warn`
192
193 Data type: `Variant[Boolean, String]`
194
195 Specifies whether to add a header message at the top of the destination file. Valid options: the booleans true and false, or a string
196 to serve as the header.
197 If you set 'warn' to true, concat adds the following line with an order of 0:
198 `# This file is managed by Puppet. DO NOT EDIT.`
199 Before 2.0.0, this parameter would add a newline at the end of the warn message. To improve flexibilty, this was removed. Please add
200 it explicitly if you need it.
201
202 Default value: `false`
203
204 ### concat::fragment
205
206 Manages a fragment of text to be compiled into a file.
207
208 #### Parameters
209
210 The following parameters are available in the `concat::fragment` defined type.
211
212 ##### `content`
213
214 Data type: `Optional[String]`
215
216 Supplies the content of the fragment. Note: You must supply either a content parameter or a source parameter.
217
218 Default value: `undef`
219
220 ##### `order`
221
222 Data type: `Variant[String, Integer]`
223
224 Reorders your fragments within the destination file. Fragments that share the same order number are ordered by name. The string
225 option is recommended.
226
227 Default value: '10'
228
229 ##### `source`
230
231 Data type: `Optional[Variant[String, Array]]`
232
233 Specifies a file to read into the content of the fragment. Note: You must supply either a content parameter or a source parameter.
234 Valid options: a string or an array, containing one or more Puppet URLs.
235
236 Default value: `undef`
237
238 ##### `target`
239
240 Data type: `String`
241
242 Specifies the destination file of the fragment. Valid options: a string containing the path or title of the parent concat resource.
243
244 ## Resource types
245
246 ### concat_file
247
248 Generates a file with content from fragments sharing a common unique tag.
249
250 #### Examples
251
252 ##### 
253
254 ```puppet
255 Concat_fragment <<| tag == 'unique_tag' |>>
256
257 concat_file { '/tmp/file':
258   tag            => 'unique_tag', # Optional. Default to undef
259   path           => '/tmp/file',  # Optional. If given it overrides the resource name
260   owner          => 'root',       # Optional. Default to undef
261   group          => 'root',       # Optional. Default to undef
262   mode           => '0644'        # Optional. Default to undef
263   order          => 'numeric'     # Optional, Default to 'numeric'
264   ensure_newline => false         # Optional, Defaults to false
265 }
266 ```
267
268 #### Properties
269
270 The following properties are available in the `concat_file` type.
271
272 ##### `ensure`
273
274 Valid values: present, absent
275
276 Specifies whether the destination file should exist. Setting to 'absent' tells Puppet to delete the destination file if it exists, and
277 negates the effect of any other parameters.
278
279 Default value: present
280
281 #### Parameters
282
283 The following parameters are available in the `concat_file` type.
284
285 ##### `tag`
286
287 Required. Specifies a unique tag reference to collect all concat_fragments with the same tag.
288
289 ##### `path`
290
291 Specifies a destination file for the combined fragments. Valid options: a string containing an absolute path. Default value: the
292 title of your declared resource.
293
294 ##### `owner`
295
296 Specifies the owner of the destination file. Valid options: a string containing a username or integer containing a uid.
297
298 ##### `group`
299
300 Specifies a permissions group for the destination file. Valid options: a string containing a group name or integer containing a
301 gid.
302
303 ##### `mode`
304
305 Specifies the permissions mode of the destination file. Valid options: a string containing a permission mode value in octal notation.
306
307 ##### `order`
308
309 Valid values: alpha, numeric
310
311 Specifies a method for sorting your fragments by name within the destination file. You can override this setting for individual
312 fragments by adjusting the order parameter in their concat::fragment declarations.
313
314 Default value: numeric
315
316 ##### `backup`
317
318 Specifies whether (and how) to back up the destination file before overwriting it. Your value gets passed on to Puppet's native file
319 resource for execution. Valid options: true, false, or a string representing either a target filebucket or a filename extension
320 beginning with ".".'
321
322 ##### `replace`
323
324 Valid values: `true`, `false`, yes, no
325
326 Specifies whether to overwrite the destination file if it already exists.
327
328 Default value: `true`
329
330 ##### `validate_cmd`
331
332 Specifies a validation command to apply to the destination file. Requires Puppet version 3.5 or newer. Valid options: a string to
333 be passed to a file resource.
334
335 ##### `ensure_newline`
336
337 Valid values: `true`, `false`, yes, no
338
339 Specifies whether to add a line break at the end of each fragment that doesn't already end in one.
340
341 Default value: `false`
342
343 ##### `format`
344
345 Valid values: plain, yaml, json, json-array, json-pretty, json-array-pretty
346
347 Specify what data type to merge the fragments as. Valid options: 'plain', 'yaml', 'json', 'json-array', 'json-pretty', 'json-array-pretty'.
348
349 Default value: plain
350
351 ##### `force`
352
353 Valid values: `true`, `false`, yes, no
354
355 Specifies whether to merge data structures, keeping the values with higher order.
356
357 Default value: `false`
358
359 ##### `selinux_ignore_defaults`
360
361 Valid values: `true`, `false`, yes, no
362
363 See the file type's selinux_ignore_defaults documentention:
364 https://docs.puppetlabs.com/references/latest/type.html#file-attribute-selinux_ignore_defaults.
365
366 ##### `selrange`
367
368 See the file type's selrange documentention: https://docs.puppetlabs.com/references/latest/type.html#file-attribute-selrange
369
370 ##### `selrole`
371
372 See the file type's selrole documentention: https://docs.puppetlabs.com/references/latest/type.html#file-attribute-selrole
373
374 ##### `seltype`
375
376 See the file type's seltype documentention: https://docs.puppetlabs.com/references/latest/type.html#file-attribute-seltype
377
378 ##### `seluser`
379
380 See the file type's seluser documentention: https://docs.puppetlabs.com/references/latest/type.html#file-attribute-seluser
381
382 ##### `show_diff`
383
384 Valid values: `true`, `false`, yes, no
385
386 Specifies whether to set the show_diff parameter for the file resource. Useful for hiding secrets stored in hiera from insecure
387 reporting methods.
388
389 ### concat_fragment
390
391 Manages the fragment.
392
393 #### Examples
394
395 ##### 
396
397 ```puppet
398 # The example is based on exported resources.
399
400 concat_fragment { \"uniqe_name_${::fqdn}\":
401   tag => 'unique_name',
402   order => 10, # Optional. Default to 10
403   content => 'some content' # OR
404   # content => template('template.erb')
405   source  => 'puppet:///path/to/file'
406 }
407 ```
408
409 #### Parameters
410
411 The following parameters are available in the `concat_fragment` type.
412
413 ##### `name`
414
415 namevar
416
417 Name of resource.
418
419 ##### `target`
420
421 Required. Specifies the destination file of the fragment. Valid options: a string containing the path or title of the parent
422 concat_file resource.
423
424 ##### `content`
425
426 Supplies the content of the fragment. Note: You must supply either a content parameter or a source parameter. Valid options: a string
427
428 ##### `source`
429
430 Specifies a file to read into the content of the fragment. Note: You must supply either a content parameter or a source parameter.
431 Valid options: a string or an array, containing one or more Puppet URLs.
432
433 ##### `order`
434
435 Reorders your fragments within the destination file. Fragments that share the same order number are ordered by name. The string
436 option is recommended.
437
438 Default value: 10
439
440 ##### `tag`
441
442 Specifies a unique tag to be used by concat_file to reference and collect content.
443