Resource Type: concat_file

Defined in:
vendor_modules/concat/lib/puppet/type/concat_file.rb

Overview

Examples:

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

  • ensure (defaults to: present)

    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.

    Supported values:
    • present
    • absent

Parameters

  • 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 “.”.'

  • ensure_newline (defaults to: false)

    Specifies whether to add a line break at the end of each fragment that doesn't already end in one.

    Supported values:
    • true
    • false
    • yes
    • no
  • force (defaults to: false)

    Specifies whether to merge data structures, keeping the values with higher order.

    Supported values:
    • true
    • false
    • yes
    • no
  • format (defaults to: plain)

    Specify what data type to merge the fragments as. Valid options: 'plain', 'yaml', 'json', 'json-array', 'json-pretty', 'json-array-pretty'.

    Supported values:
    • plain
    • yaml
    • json
    • :'json-array'
    • :'json-pretty'
    • :'json-array-pretty'
  • group

    Specifies a permissions group for the destination file. Valid options: a string containing a group name or integer containing a gid.

  • mode

    Specifies the permissions mode of the destination file. Valid options: a string containing a permission mode value in octal notation.

  • order (defaults to: 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.

    Supported values:
    • alpha
    • numeric
  • owner

    Specifies the owner of the destination file. Valid options: a string containing a username or integer containing a uid.

  • 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.

  • replace (defaults to: true)

    Specifies whether to overwrite the destination file if it already exists.

    Supported values:
    • true
    • false
    • yes
    • no
  • selinux_ignore_defaults

    See the file type's selinux_ignore_defaults documentention: docs.puppetlabs.com/references/latest/type.html#file-attribute-selinux_ignore_defaults.

    Supported values:
    • true
    • false
    • yes
    • no
  • selrange
  • selrole
  • seltype
  • seluser
  • show_diff

    Specifies whether to set the show_diff parameter for the file resource. Useful for hiding secrets stored in hiera from insecure reporting methods.

    Supported values:
    • true
    • false
    • yes
    • no
  • tag

    Required. Specifies a unique tag reference to collect all concat_fragments with the same tag.

  • 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.