File tree Expand file tree Collapse file tree 1 file changed +19
-18
lines changed Expand file tree Collapse file tree 1 file changed +19
-18
lines changed Original file line number Diff line number Diff line change 2020 Integer[0] $tries = 10,
2121) {
2222
23- mongodb_database { $db_name:
24- ensure => present ,
25- tries => $tries ,
26- }
23+ if $facts [' mongodb_is_master' ] == ' true' { # lint:ignore:quoted_booleans
24+ mongodb_database { $db_name:
25+ ensure => present ,
26+ tries => $tries ,
27+ }
2728
28- if $password_hash {
29- $hash = $password_hash
30- } elsif $password {
31- $hash = mongodb_password($user , $password )
32- } else {
33- fail(" Parameter 'password_hash' or 'password' should be provided to mongodb::db." )
34- }
29+ if $password_hash {
30+ $hash = $password_hash
31+ } elsif $password {
32+ $hash = mongodb_password($user , $password )
33+ } else {
34+ fail(" Parameter 'password_hash' or 'password' should be provided to mongodb::db." )
35+ }
3536
36- mongodb_user { "User ${user} on db ${db_name}" :
37- ensure => present ,
38- password_hash => $hash ,
39- username => $user ,
40- database => $db_name ,
41- roles => $roles ,
37+ mongodb_user { "User ${user} on db ${db_name}" :
38+ ensure => present ,
39+ password_hash => $hash ,
40+ username => $user ,
41+ database => $db_name ,
42+ roles => $roles ,
43+ }
4244 }
43-
4445}
You can’t perform that action at this time.
0 commit comments