File tree 1 file changed +9
-1
lines changed 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 16
16
# @param target
17
17
# Specifies the destination file of the fragment. Valid options: a string containing the path or title of the parent concat resource.
18
18
#
19
+ # @param tag
20
+ # Specifies a custom tag to use for the fragment.
21
+ #
19
22
define concat::fragment (
20
23
String $target ,
21
24
Optional[Variant[Sensitive[String], String, Deferred]] $content = undef ,
22
25
Optional[Variant[String, Array]] $source = undef ,
26
+ Optional[String[1]] $tag = undef ,
23
27
Variant[String, Integer] $order = ' 10' ,
24
28
) {
25
29
$resource = ' Concat::Fragment'
34
38
fail(" ${resource} ['${title} ']: Can't use 'source' and 'content' at the same time." )
35
39
}
36
40
37
- $safe_target_name = regsubst($target , ' [\\\\ /:~\n\s\+\*\(\) @]' , ' _' , ' GM' )
41
+ if $tag =~ Undef {
42
+ $safe_target_name = regsubst($target , ' [\\\\ /:~\n\s\+\*\(\) @]' , ' _' , ' GM' )
43
+ } else {
44
+ $safe_target_name = $tag
45
+ }
38
46
39
47
concat_fragment { $name:
40
48
target => $target ,
You can’t perform that action at this time.
0 commit comments