File tree 6 files changed +55
-3
lines changed
spec/fixtures/modules/redact/manifests
6 files changed +55
-3
lines changed Original file line number Diff line number Diff line change 16
16
/log /
17
17
/pkg /
18
18
/spec /fixtures /manifests /
19
- /spec /fixtures /modules /
19
+ /spec /fixtures /modules /*
20
20
/tmp /
21
21
/vendor /
22
22
/convert_report.txt
26
26
.envrc
27
27
/inventory.yaml
28
28
/spec /fixtures /litmus_inventory.yaml
29
+ ! /spec /fixtures /modules /redact /
Original file line number Diff line number Diff line change 16
16
/log/
17
17
/pkg/
18
18
/spec/fixtures/manifests/
19
- /spec/fixtures/modules/
19
+ /spec/fixtures/modules/*
20
20
/tmp/
21
21
/vendor/
22
22
/convert_report.txt
Original file line number Diff line number Diff line change @@ -28,3 +28,6 @@ spec/spec_helper.rb:
28
28
unmanaged : false
29
29
.github/workflows/release_prep.yml :
30
30
unmanaged : false
31
+ .gitignore :
32
+ paths :
33
+ - ' !/spec/fixtures/modules/redact/'
Original file line number Diff line number Diff line change 141
141
],
142
142
"template-url" : " https://github.com/puppetlabs/pdk-templates.git#main" ,
143
143
"pdk-version" : " 2.7.1" ,
144
- "template-ref" : " heads/main-0-gab2bd48 "
144
+ "template-ref" : " heads/main-0-g9675180 "
145
145
}
Original file line number Diff line number Diff line change
1
+ class redact (
2
+ $param,
3
+ $redacted,
4
+ $replaced,
5
+ ) {
6
+ notice (" The value of param is ${param} " )
7
+ notice (" The value of redacted is ${redacted} " )
8
+ notice (" The value of replaced is ${replaced} " )
9
+
10
+ redact(' redacted' )
11
+ redact(' replaced' , ' a replacement string' )
12
+
13
+ redact::thing { 'one' :
14
+ param => ' a param' ,
15
+ redacted => ' to be redacted' ,
16
+ replaced => ' to be replaced' ,
17
+ }
18
+ redact::thing { 'two' :
19
+ param => ' a param' ,
20
+ redacted => ' to be redacted' ,
21
+ replaced => ' to be replaced' ,
22
+ }
23
+ redact::thing {
24
+ default:
25
+ param => ' a param' ,
26
+ redacted => ' to be redacted' ,
27
+ replaced => ' to be replaced' ,
28
+ ;
29
+ ' three' :;
30
+ ' four' :;
31
+ }
32
+ }
Original file line number Diff line number Diff line change
1
+ define redact::thing (
2
+ $param ,
3
+ $redacted ,
4
+ $replaced ,
5
+ ) {
6
+ redact(' redacted' )
7
+ redact(' replaced' , ' a replacement string' )
8
+
9
+ # In real-use, there would be no point in using redact if you then exposed
10
+ # the unredacted parameters in other resources.
11
+ # But we need some resources in our catalog for testing that the variables
12
+ # are available to use un-redacted.
13
+ notify { "${name} The value of param is ${param}" :}
14
+ notify { "${name} The value of redacted is ${redacted}" :}
15
+ notify { "${name} The value of replaced is ${replaced}" :}
16
+ }
You can’t perform that action at this time.
0 commit comments