<!--
Thank you for contributing to this project!
-->
Add support for net.ssl.allowConnectionsWithoutCertificates setting in mongod.conf
<!--
Thank you for contributing to this project!
-->
<!--
separate definition of /root/.mongorc.js file
-->
<!--
Fixes #449
-->
The README currently does not give a hint how to configure an arbiter node for a replica set. That feature has been introduced with pull request #182.
It should also be possible to configure an arbiter by parameter replset_arbiter
of mongodb::server
.
modulesync 9.0.0
<!--
Thank you for contributing to this project!
-->
Added the mechanism parameter for the passwordhash command
```
def passwordhash=(value)
if dbismaster
command = {
updateUser: @resource[:username],
pwd: @resource[:passwordhash],
digestPassword: false
}
command[:mechanisms] = @resource[:authmechanism] == :scramsha1 ? ['SCRAM-SHA-1'] : ['SCRAM-SHA-256']
mongoeval("db.runCommand(#{command.tojson})", @resource[:database])
else
Puppet.warning 'User password operations are available only from master host'
end
end
```
Changed unit test for mongodbuser due to new expected line generated for passwordhash command.
Fixes #649
modulesync 5.1.0
An initial puppet run (eg. in a vagrant box) will produce an error while trying to resolve the mongodbversion fact:
```
Facter: error while resolving custom fact "mongodbversion": undefined method '[]' for nil:NilClass
```
The reason is that the check for the existence of the mongo binary is inside the setcode block.
This pull request uses the fact confinement mechanism to pre-empt the fact resolution if the mongo binary is not available.
Fix for several issues: SSL, Replicaset initialization, Secondary checking, etc..
Enable MongoDB 5.0 support
Fix mongorcjs typo
Fixed mongorc.js type for secondary check
Add support for Mongo 4.x secondary check
Fix SSL support for MongoDB 4.x
Fix for MongoDB v4 Replica Set initialization
Using Amazon specific package repos when os name is amazon.
<!--
Thank you for contributing to this project!
-->
<!--
-->
<!--
Thank you for contributing to this project!
-->
Add support for replication.enableMajorityReadConcern setting in mongod.conf.
…while auth is enabled
<!--
Thank you for contributing to this project!
-->
On arbitrator servers you get the following message when auth is enabled:
Notice: /Stage[main]/Mongodb::Replset/Mongodb_replset[example_set]/ensure: created (corrective)
Warning: Host mongoarb01:27017 is available, but you are unauthorized because of authentication is enabled: true
In debug mode you can see:
```
Debug: Request failed: 'Execution of '/usr/bin/mongo admin --quiet --host 127.0.0.1:27017 --eval load('/root/.mongorc.js'); printjson(rs.conf())' returned 252: uncaught exception: Error: Could not retrieve replica set config: {
"ok" : 0,
"errmsg" : "not authorized on admin to execute command { replSetGetConfig: 1.0, lsid: { id: UUID(\"a2213cd2-e6c4-4d15-bf29-d01b7a54a838\") }, $db: \"admin\" }",
"code" : 13,
"codeName" : "Unauthorized"
} :
```
The admin user has all the needed rights but this errmsg keeps telling us it has not.
For this reason I created a variable so we can disable this class on our arbitrator nodes by setting:
mongodb::replset::sets_creation: false
<!--
Replace this comment with the list of issues or n/a.
Use format:
Fixes #123
Fixes #124
-->
Currently the mongodb command updateUser
defaults to SCRAM-SHA-256 but you can't update these passwords.
And also show an error when the update goes wrong.
<!--
Thank you for contributing to this project!
-->
Currently the mongodb command updateUser
defaults to SCRAM-SHA-256 but you can't update these passwords.
So now set the correct mecahnisms
and handle the response of the command. So if you try to update this hash with SCRAM-SHA-256
you will see an error message. If you use scram_sha_1
it will update the password and continue like it should.
Fixes #649
Fixes https://github.com/voxpupuli/puppet-mongodb/pull/650
<!--
Thank you for contributing to this project!
-->
Support for pure yaml in /etc/mongodb.cfg.
Right now only records like net.bindIp
are supported, and if for example, you are using custom configuration template and your configuration looks like:
yaml
net:
port: 27017
bindIp: 0.0.0.0
you will get an error like Error: Could not prefetch mongodb_database provider 'mongodb': Could not evaluate MongoDB shell command: load('/root/.mongorc.js'); rs.slaveOk();printjson(db.getMongo().getDBs())
when using providers.
This PR adds support for both configuration file formats
Fixes #562 for user @seidler2547
As this module now support the latest mongodb versions the default repo version should reflect this.
Fixes #754
Default version in globals.pp doesn't allow to use repolocation and having repolocation doesn't work at all, because it fails on check, as version is always defined
if $version != undef and $repo_location != undef {
fail('version' is not supported with 'repo_location')
}
To fix this I propose to set default version only if both $version and $repo_location are undef.
One can't use repo_location setting