|
69 | 69 | $ssl_ca = undef, |
70 | 70 | $restart = $mongodb::params::restart, |
71 | 71 | $storage_engine = undef, |
| 72 | + $version = $mongodb::params::version, |
72 | 73 |
|
73 | 74 | $create_admin = $mongodb::params::create_admin, |
74 | 75 | $admin_username = $mongodb::params::admin_username, |
|
169 | 170 | # Make sure that the ordering is correct |
170 | 171 | if $create_admin { |
171 | 172 | Class['mongodb::replset'] -> Mongodb::Db['admin'] |
172 | | - if $::mongodb_is_master == 'not_installed' and $auth == true and $noauth != true and versioncmp($version, '2.6.0') >= 0 { |
| 173 | + if $::mongodb_is_master == 'not_installed' and $auth == true and $noauth != true and versioncmp($version, '2.6.0') >= 0 { |
173 | 174 | file_line{ 'enable_authentication' : |
174 | 175 | ensure => present, |
175 | 176 | path => $config, |
176 | | - match => "security.authorization:", |
177 | | - line => "security.authorization: enabled", |
| 177 | + match => 'security.authorization:', |
| 178 | + line => 'security.authorization: enabled', |
178 | 179 | require => [Class['mongodb::replset'], Mongodb::Db['admin'] ] |
179 | 180 | } |
180 | 181 | if $keyfile { |
181 | 182 | file_line{ 'enable_keyfile' : |
182 | 183 | ensure => present, |
183 | 184 | path => $config, |
184 | | - line => "security.keyFile: $keyfile", |
| 185 | + line => "security.keyFile: ${keyfile}", |
185 | 186 | require => [Class['mongodb::replset'], Mongodb::Db['admin']], |
186 | 187 | notify => Exec['/sbin/restart mongod'] |
187 | 188 | } |
|
0 commit comments