Skip to content

Commit aefc5b9

Browse files
author
Cocker Koch
committed
Accept Puppet-Datatype Sensitive
- let the Hash containing the Secrets for the Keystore accept Secrets of Datatype Sensitive - fix a 15-Months-old Typo-Bug
1 parent fef31dc commit aefc5b9

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

manifests/config.pp

+6-2
Original file line numberDiff line numberDiff line change
@@ -202,11 +202,15 @@
202202

203203
# Add secrets to keystore
204204
if $elasticsearch::secrets != undef {
205+
# unwrap Secrets of Datatype Sensitive
206+
$secrets = $elasticsearch::secrets.reduce({}) |Hash $memo, Array $value| {
207+
$memo + { $value[0] => if $value[1] =~ Sensitive { $value[1].unwrap } else { $value[1] } }
208+
}
205209
elasticsearch_keystore { 'elasticsearch_secrets':
206210
configdir => $elasticsearch::configdir,
207211
purge => $elasticsearch::purge_secrets,
208-
settings => $elasticsearch::secrets,
209-
notify => $::elaticsearch::_notify_service,
212+
settings => $secrets,
213+
notify => $::elasticsearch::_notify_service,
210214
}
211215
}
212216

0 commit comments

Comments
 (0)