Skip to content

Commit 19b9dcc

Browse files
committed
server: remove unnecessary $admin_password_unsensitive logic
Unwrapping a plain string just returns the string, so no need to check if it's sensitive.
1 parent b06dd82 commit 19b9dcc

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

manifests/server.pp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -430,16 +430,11 @@
430430
Class['mongodb::server::service'] -> Class['mongodb::server::config'] -> Class['mongodb::server::install']
431431
}
432432

433-
$admin_password_unsensitive = if $admin_password =~ Sensitive[String] {
434-
$admin_password.unwrap
435-
} else {
436-
$admin_password
437-
}
438433
if $create_admin and ($service_ensure == 'running' or $service_ensure == true) {
439434
mongodb::db { 'admin':
440435
user => $admin_username,
441436
auth_mechanism => $admin_auth_mechanism,
442-
password => $admin_password_unsensitive,
437+
password => $admin_password.unwrap,
443438
password_hash => $admin_password_hash,
444439
roles => $admin_roles,
445440
update_password => $admin_update_password,

0 commit comments

Comments
 (0)