Skip to content

Commit 96d30f2

Browse files
committedJun 5, 2023
(maint) - exclude redact module in .gitignore
1 parent ade0e36 commit 96d30f2

File tree

6 files changed

+55
-3
lines changed

6 files changed

+55
-3
lines changed
 

‎.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
/log/
1717
/pkg/
1818
/spec/fixtures/manifests/
19-
/spec/fixtures/modules/
19+
/spec/fixtures/modules/*
2020
/tmp/
2121
/vendor/
2222
/convert_report.txt
@@ -26,3 +26,4 @@
2626
.envrc
2727
/inventory.yaml
2828
/spec/fixtures/litmus_inventory.yaml
29+
!/spec/fixtures/modules/redact/

‎.pdkignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
/log/
1717
/pkg/
1818
/spec/fixtures/manifests/
19-
/spec/fixtures/modules/
19+
/spec/fixtures/modules/*
2020
/tmp/
2121
/vendor/
2222
/convert_report.txt

‎.sync.yml

+3
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,6 @@ spec/spec_helper.rb:
2828
unmanaged: false
2929
.github/workflows/release_prep.yml:
3030
unmanaged: false
31+
.gitignore:
32+
paths:
33+
- '!/spec/fixtures/modules/redact/'

‎metadata.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -141,5 +141,5 @@
141141
],
142142
"template-url": "https://github.com/puppetlabs/pdk-templates.git#main",
143143
"pdk-version": "2.7.1",
144-
"template-ref": "heads/main-0-gab2bd48"
144+
"template-ref": "heads/main-0-g9675180"
145145
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
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 numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
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+
}

0 commit comments

Comments
 (0)
Please sign in to comment.