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 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513
|
# Reference
<!-- DO NOT EDIT: This document was generated by Puppet Strings -->
## Table of Contents
### Defined types
* [`concat`](#concat): Manages a file, compiled from one or more text fragments.
* [`concat::fragment`](#concat--fragment): Manages a fragment of text to be compiled into a file.
### Resource types
* [`concat_file`](#concat_file): Generates a file with content from fragments sharing a common unique tag.
* [`concat_fragment`](#concat_fragment): Manages the fragment.
## Defined types
### <a name="concat"></a>`concat`
Manages a file, compiled from one or more text fragments.
#### Examples
#####
```puppet
concat { '/tmp/concat':
ensure => present,
owner => 'root',
group => 'root',
mode => '0644',
}
```
#### Parameters
The following parameters are available in the `concat` defined type:
* [`backup`](#-concat--backup)
* [`ensure`](#-concat--ensure)
* [`ensure_newline`](#-concat--ensure_newline)
* [`format`](#-concat--format)
* [`force`](#-concat--force)
* [`group`](#-concat--group)
* [`mode`](#-concat--mode)
* [`order`](#-concat--order)
* [`owner`](#-concat--owner)
* [`path`](#-concat--path)
* [`replace`](#-concat--replace)
* [`selinux_ignore_defaults`](#-concat--selinux_ignore_defaults)
* [`selrange`](#-concat--selrange)
* [`selrole`](#-concat--selrole)
* [`seltype`](#-concat--seltype)
* [`seluser`](#-concat--seluser)
* [`show_diff`](#-concat--show_diff)
* [`validate_cmd`](#-concat--validate_cmd)
* [`warn`](#-concat--warn)
##### <a name="-concat--backup"></a>`backup`
Data type: `Variant[Boolean, String]`
Specifies whether (and how) to back up the destination file before overwriting it. Your value gets passed on to Puppet's native file
resource for execution. Valid options: true, false, or a string representing either a target filebucket or a filename extension
beginning with ".".
Default value: `'puppet'`
##### <a name="-concat--ensure"></a>`ensure`
Data type: `Enum['present', 'absent']`
Specifies whether the destination file should exist. Setting to 'absent' tells Puppet to delete the destination file if it exists, and
negates the effect of any other parameters.
Default value: `'present'`
##### <a name="-concat--ensure_newline"></a>`ensure_newline`
Data type: `Boolean`
Specifies whether to add a line break at the end of each fragment that doesn't already end in one.
Default value: `false`
##### <a name="-concat--format"></a>`format`
Data type: `Optional[String]`
Specify what data type to merge the fragments as. Valid options: 'plain', 'yaml', 'json', 'json-array', 'json-pretty',
'json-array-pretty'.
Default value: `'plain'`
##### <a name="-concat--force"></a>`force`
Data type: `Optional[Boolean]`
Specifies whether to merge data structures, keeping the values with higher order. Used when format is specified as a value other than
'plain'.
Default value: `false`
##### <a name="-concat--group"></a>`group`
Data type: `Optional[Variant[String, Integer]]`
Specifies a permissions group for the destination file. Valid options: a string containing a group name or integer containing a gid.
Default value: `undef`
##### <a name="-concat--mode"></a>`mode`
Data type: `String`
Specifies the permissions mode of the destination file. Valid options: a string containing a permission mode value in octal notation.
Default value: `'0644'`
##### <a name="-concat--order"></a>`order`
Data type: `Enum['alpha','numeric']`
Specifies a method for sorting your fragments by name within the destination file. You can override this setting for individual
fragments by adjusting the order parameter in their concat::fragment declarations.
Default value: `'alpha'`
##### <a name="-concat--owner"></a>`owner`
Data type: `Optional[Variant[String, Integer]]`
Specifies the owner of the destination file. Valid options: a string containing a username or integer containing a uid.
Default value: `undef`
##### <a name="-concat--path"></a>`path`
Data type: `Stdlib::Absolutepath`
Specifies a destination file for the combined fragments.
Default value: `$name`
##### <a name="-concat--replace"></a>`replace`
Data type: `Boolean`
Specifies whether to overwrite the destination file if it already exists.
Default value: `true`
##### <a name="-concat--selinux_ignore_defaults"></a>`selinux_ignore_defaults`
Data type: `Optional[Boolean]`
See the file type's selinux_ignore_defaults documentention:
https://docs.puppetlabs.com/references/latest/type.html#file-attribute-selinux_ignore_defaults
Default value: `undef`
##### <a name="-concat--selrange"></a>`selrange`
Data type: `Optional[String]`
See the file type's selrange documentention: https://docs.puppetlabs.com/references/latest/type.html#file-attribute-selrange
Default value: `undef`
##### <a name="-concat--selrole"></a>`selrole`
Data type: `Optional[String]`
See the file type's selrole documentention: https://docs.puppetlabs.com/references/latest/type.html#file-attribute-selrole
Default value: `undef`
##### <a name="-concat--seltype"></a>`seltype`
Data type: `Optional[String]`
See the file type's seltype documentention: https://docs.puppetlabs.com/references/latest/type.html#file-attribute-seltype
Default value: `undef`
##### <a name="-concat--seluser"></a>`seluser`
Data type: `Optional[String]`
See the file type's seluser documentention: https://docs.puppetlabs.com/references/latest/type.html#file-attribute-seluser
Default value: `undef`
##### <a name="-concat--show_diff"></a>`show_diff`
Data type: `Boolean`
Specifies whether to set the show_diff parameter for the file resource. Useful for hiding secrets stored in hiera from insecure
reporting methods.
Default value: `true`
##### <a name="-concat--validate_cmd"></a>`validate_cmd`
Data type: `Optional[String]`
Specifies a validation command to apply to the destination file.
Default value: `undef`
##### <a name="-concat--warn"></a>`warn`
Data type: `Variant[Boolean, String]`
Specifies whether to add a header message at the top of the destination file. Valid options: the booleans true and false, or a string
to serve as the header.
If you set 'warn' to true, concat adds the following line with an order of 0:
`# This file is managed by Puppet. DO NOT EDIT.`
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
it explicitly if you need it.
Default value: `false`
### <a name="concat--fragment"></a>`concat::fragment`
Manages a fragment of text to be compiled into a file.
#### Parameters
The following parameters are available in the `concat::fragment` defined type:
* [`content`](#-concat--fragment--content)
* [`order`](#-concat--fragment--order)
* [`source`](#-concat--fragment--source)
* [`target`](#-concat--fragment--target)
##### <a name="-concat--fragment--content"></a>`content`
Data type: `Optional[Any]`
Supplies the content of the fragment. Note: You must supply either a content parameter or a source parameter.
Allows a String or a Deferred function which returns a String.
Default value: `undef`
##### <a name="-concat--fragment--order"></a>`order`
Data type: `Variant[String, Integer]`
Reorders your fragments within the destination file. Fragments that share the same order number are ordered by name. The string
option is recommended.
Default value: `'10'`
##### <a name="-concat--fragment--source"></a>`source`
Data type: `Optional[Variant[String, Array]]`
Specifies a file to read into the content of the fragment. Note: You must supply either a content parameter or a source parameter.
Valid options: a string or an array, containing one or more Puppet URLs.
Default value: `undef`
##### <a name="-concat--fragment--target"></a>`target`
Data type: `String`
Specifies the destination file of the fragment. Valid options: a string containing the path or title of the parent concat resource.
## Resource types
### <a name="concat_file"></a>`concat_file`
Generates a file with content from fragments sharing a common unique tag.
#### Examples
#####
```puppet
Concat_fragment <<| tag == 'unique_tag' |>>
concat_file { '/tmp/file':
tag => 'unique_tag', # Optional. Default to undef
path => '/tmp/file', # Optional. If given it overrides the resource name
owner => 'root', # Optional. Default to undef
group => 'root', # Optional. Default to undef
mode => '0644' # Optional. Default to undef
order => 'numeric' # Optional, Default to 'numeric'
ensure_newline => false # Optional, Defaults to false
}
```
#### Properties
The following properties are available in the `concat_file` type.
##### `ensure`
Valid values: `present`, `absent`
Specifies whether the destination file should exist. Setting to 'absent' tells Puppet to delete the destination file if it exists, and
negates the effect of any other parameters.
Default value: `present`
#### Parameters
The following parameters are available in the `concat_file` type.
* [`backup`](#-concat_file--backup)
* [`ensure_newline`](#-concat_file--ensure_newline)
* [`force`](#-concat_file--force)
* [`format`](#-concat_file--format)
* [`group`](#-concat_file--group)
* [`mode`](#-concat_file--mode)
* [`order`](#-concat_file--order)
* [`owner`](#-concat_file--owner)
* [`path`](#-concat_file--path)
* [`replace`](#-concat_file--replace)
* [`selinux_ignore_defaults`](#-concat_file--selinux_ignore_defaults)
* [`selrange`](#-concat_file--selrange)
* [`selrole`](#-concat_file--selrole)
* [`seltype`](#-concat_file--seltype)
* [`seluser`](#-concat_file--seluser)
* [`show_diff`](#-concat_file--show_diff)
* [`tag`](#-concat_file--tag)
* [`validate_cmd`](#-concat_file--validate_cmd)
##### <a name="-concat_file--backup"></a>`backup`
Specifies whether (and how) to back up the destination file before overwriting it. Your value gets passed on to Puppet's
native file
resource for execution. Valid options: true, false, or a string representing either a target filebucket or a filename
extension
beginning with ".".'
##### <a name="-concat_file--ensure_newline"></a>`ensure_newline`
Valid values: `true`, `false`, `yes`, `no`
Specifies whether to add a line break at the end of each fragment that doesn't already end in one.
Default value: `false`
##### <a name="-concat_file--force"></a>`force`
Valid values: `true`, `false`, `yes`, `no`
Specifies whether to merge data structures, keeping the values with higher order.
Default value: `false`
##### <a name="-concat_file--format"></a>`format`
Valid values: `plain`, `yaml`, `json`, `json-array`, `json-pretty`, `json-array-pretty`
Specify what data type to merge the fragments as. Valid options: 'plain', 'yaml', 'json', 'json-array', 'json-pretty',
'json-array-pretty'.
Default value: `plain`
##### <a name="-concat_file--group"></a>`group`
Specifies a permissions group for the destination file. Valid options: a string containing a group name or integer
containing a
gid.
##### <a name="-concat_file--mode"></a>`mode`
Specifies the permissions mode of the destination file. Valid options: a string containing a permission mode value in
octal notation.
##### <a name="-concat_file--order"></a>`order`
Valid values: `alpha`, `numeric`
Specifies a method for sorting your fragments by name within the destination file. You can override this setting for
individual
fragments by adjusting the order parameter in their concat::fragment declarations.
Default value: `numeric`
##### <a name="-concat_file--owner"></a>`owner`
Specifies the owner of the destination file. Valid options: a string containing a username or integer containing a uid.
##### <a name="-concat_file--path"></a>`path`
Specifies a destination file for the combined fragments. Valid options: a string containing an absolute path. Default
value: the
title of your declared resource.
##### <a name="-concat_file--replace"></a>`replace`
Valid values: `true`, `false`, `yes`, `no`
Specifies whether to overwrite the destination file if it already exists.
Default value: `true`
##### <a name="-concat_file--selinux_ignore_defaults"></a>`selinux_ignore_defaults`
Valid values: `true`, `false`, `yes`, `no`
See the file type's selinux_ignore_defaults documentention:
https://docs.puppetlabs.com/references/latest/type.html#file-attribute-selinux_ignore_defaults.
##### <a name="-concat_file--selrange"></a>`selrange`
See the file type's selrange documentation:
https://docs.puppetlabs.com/references/latest/type.html#file-attribute-selrange
##### <a name="-concat_file--selrole"></a>`selrole`
See the file type's selrole documentation:
https://docs.puppetlabs.com/references/latest/type.html#file-attribute-selrole
##### <a name="-concat_file--seltype"></a>`seltype`
See the file type's seltype documentation:
https://docs.puppetlabs.com/references/latest/type.html#file-attribute-seltype
##### <a name="-concat_file--seluser"></a>`seluser`
See the file type's seluser documentation:
https://docs.puppetlabs.com/references/latest/type.html#file-attribute-seluser
##### <a name="-concat_file--show_diff"></a>`show_diff`
Valid values: `true`, `false`, `yes`, `no`
Specifies whether to set the show_diff parameter for the file resource. Useful for hiding secrets stored in hiera from
insecure
reporting methods.
##### <a name="-concat_file--tag"></a>`tag`
Required. Specifies a unique tag reference to collect all concat_fragments with the same tag.
##### <a name="-concat_file--validate_cmd"></a>`validate_cmd`
Specifies a validation command to apply to the destination file. Requires Puppet version 3.5 or newer. Valid options: a
string to
be passed to a file resource.
### <a name="concat_fragment"></a>`concat_fragment`
Manages the fragment.
#### Examples
#####
```puppet
# The example is based on exported resources.
concat_fragment { \"uniqe_name_${::fqdn}\":
tag => 'unique_name',
order => 10, # Optional. Default to 10
content => 'some content' # OR
# content => template('template.erb')
source => 'puppet:///path/to/file'
}
```
#### Parameters
The following parameters are available in the `concat_fragment` type.
* [`content`](#-concat_fragment--content)
* [`name`](#-concat_fragment--name)
* [`order`](#-concat_fragment--order)
* [`source`](#-concat_fragment--source)
* [`tag`](#-concat_fragment--tag)
* [`target`](#-concat_fragment--target)
##### <a name="-concat_fragment--content"></a>`content`
Supplies the content of the fragment. Note: You must supply either a content parameter or a source parameter. Valid
options: a string
##### <a name="-concat_fragment--name"></a>`name`
namevar
Name of resource.
##### <a name="-concat_fragment--order"></a>`order`
Reorders your fragments within the destination file. Fragments that share the same order number are ordered by name. The
string
option is recommended.
Default value: `10`
##### <a name="-concat_fragment--source"></a>`source`
Specifies a file to read into the content of the fragment. Note: You must supply either a content parameter or a source
parameter.
Valid options: a string or an array, containing one or more Puppet URLs.
##### <a name="-concat_fragment--tag"></a>`tag`
Specifies a unique tag to be used by concat_file to reference and collect content.
##### <a name="-concat_fragment--target"></a>`target`
Required. Specifies the destination file of the fragment. Valid options: a string containing the path or title of the
parent
concat_file resource.
|