Skip to content

Commit 1594360

Browse files
committed
Rename tagging parameter for defined types concat and concat::fragment
avoid potential problems and warnings by overlapping with the metaparameter "tag"
1 parent a6d66c9 commit 1594360

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

manifests/fragment.pp

+4-4
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@
1616
# @param target
1717
# Specifies the destination file of the fragment. Valid options: a string containing the path or title of the parent concat resource.
1818
#
19-
# @param tag
19+
# @param tagging
2020
# Specifies a custom tag to use for the fragment.
2121
#
2222
define concat::fragment (
2323
String $target,
2424
Optional[Variant[Sensitive[String], String, Deferred]] $content = undef,
2525
Optional[Variant[String, Array]] $source = undef,
26-
Optional[String[1]] $tag = undef,
26+
Optional[String[1]] $tagging = undef,
2727
Variant[String, Integer] $order = '10',
2828
) {
2929
$resource = 'Concat::Fragment'
@@ -38,10 +38,10 @@
3838
fail("${resource}['${title}']: Can't use 'source' and 'content' at the same time.")
3939
}
4040

41-
if $tag =~ Undef {
41+
if $tagging =~ Undef {
4242
$safe_target_name = regsubst($target, '[\\\\/:~\n\s\+\*\(\)@]', '_', 'GM')
4343
} else {
44-
$safe_target_name = $tag
44+
$safe_target_name = $tagging
4545
}
4646

4747
concat_fragment { $name:

manifests/init.pp

+6-6
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@
8282
# @param create_empty_file
8383
# Specifies whether to create an empty file if no fragments are defined. Defaults to true.
8484
#
85-
# @param tag
86-
# Specifies a custom tag or list of custom tags for gatherinng the fragments to combine.
85+
# @param tagging
86+
# Specifies a custom tag or list of custom tags for gathering the fragments to combine.
8787
#
8888
define concat (
8989
Enum['present', 'absent'] $ensure = 'present',
@@ -105,8 +105,8 @@
105105
Optional[String] $seluser = undef,
106106
Boolean $force = false,
107107
Boolean $create_empty_file = true,
108-
Enum['plain', 'yaml', 'json', 'json-array', 'json-pretty', 'json-array-pretty'] $format = 'plain',
109-
Optional[Variant[String[1], Array[String[1], 1]]] $tag = undef,
108+
Enum['plain', 'yaml', 'json', 'json-array', 'json-pretty', 'json-array-pretty'] $format = 'plain',
109+
Optional[Variant[String[1], Array[String[1], 1]]] $tagging = undef,
110110
) {
111111
$safe_name = regsubst($name, '[\\\\/:~\n\s\+\*\(\)@]', '_', 'G')
112112
$default_warn_message = "# This file is managed by Puppet. DO NOT EDIT.\n"
@@ -126,10 +126,10 @@
126126
}
127127
}
128128

129-
if $tag =~ Undef {
129+
if $tagging =~ Undef {
130130
$safe_names = $safe_name
131131
} else {
132-
$safe_names = flatten($safe_name, $tag)
132+
$safe_names = flatten($safe_name, $tagging)
133133
}
134134

135135
if $ensure == 'present' {

0 commit comments

Comments
 (0)