diff --git a/manifests/fragment.pp b/manifests/fragment.pp index 7b0203a1..aa85c2cc 100644 --- a/manifests/fragment.pp +++ b/manifests/fragment.pp @@ -16,14 +16,14 @@ # @param target # Specifies the destination file of the fragment. Valid options: a string containing the path or title of the parent concat resource. # -# @param tag +# @param tagging # Specifies a custom tag to use for the fragment. # define concat::fragment ( String $target, Optional[Variant[Sensitive[String], String, Deferred]] $content = undef, Optional[Variant[String, Array]] $source = undef, - Optional[String[1]] $tag = undef, + Optional[String[1]] $tagging = undef, Variant[String, Integer] $order = '10', ) { $resource = 'Concat::Fragment' @@ -38,10 +38,10 @@ fail("${resource}['${title}']: Can't use 'source' and 'content' at the same time.") } - if $tag =~ Undef { + if $tagging =~ Undef { $safe_target_name = regsubst($target, '[\\\\/:~\n\s\+\*\(\)@]', '_', 'GM') } else { - $safe_target_name = $tag + $safe_target_name = $tagging } concat_fragment { $name: diff --git a/manifests/init.pp b/manifests/init.pp index cccbe924..b1c7ae46 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -82,8 +82,8 @@ # @param create_empty_file # Specifies whether to create an empty file if no fragments are defined. Defaults to true. # -# @param tag -# Specifies a custom tag or list of custom tags for gatherinng the fragments to combine. +# @param tagging +# Specifies a custom tag or list of custom tags for gathering the fragments to combine. # define concat ( Enum['present', 'absent'] $ensure = 'present', @@ -105,8 +105,8 @@ Optional[String] $seluser = undef, Boolean $force = false, Boolean $create_empty_file = true, - Enum['plain', 'yaml', 'json', 'json-array', 'json-pretty', 'json-array-pretty'] $format = 'plain', - Optional[Variant[String[1], Array[String[1], 1]]] $tag = undef, + Enum['plain', 'yaml', 'json', 'json-array', 'json-pretty', 'json-array-pretty'] $format = 'plain', + Optional[Variant[String[1], Array[String[1], 1]]] $tagging = undef, ) { $safe_name = regsubst($name, '[\\\\/:~\n\s\+\*\(\)@]', '_', 'G') $default_warn_message = "# This file is managed by Puppet. DO NOT EDIT.\n" @@ -126,10 +126,10 @@ } } - if $tag =~ Undef { + if $tagging =~ Undef { $safe_names = $safe_name } else { - $safe_names = flatten($safe_name, $tag) + $safe_names = flatten($safe_name, $tagging) } if $ensure == 'present' {