<!--
Thank you for contributing to this project!
-->
Add support for net.ssl.allowConnectionsWithoutCertificates setting in mongod.conf
Fix ordering of switches in dbpath_fix
's find
command
Fixes #571
<!--
Thank you for contributing to this project!
-->
<!--
separate definition of /root/.mongorc.js file
-->
<!--
Fixes #449
-->
When setting up a new replica set with authentication enabled the puppet run fails because some exceptions were not caught properly, when getting the user and database instances. When checking if the mongodb is a primary node a recheck without authentication is done to be able to create the admin user.
<!--
Replace this comment with the list of issues or n/a.
Use format:
Fixes #123
Fixes #124
-->
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
.
<!--
Thank you for contributing to this project!
-->
Add support for replication.enableMajorityReadConcern setting in mongod.conf.
Sometimes you just want to add a user or two to Mongo and not manage it with this module (because you're using managing it through Foreman/Katello as an example). In this case maybe all you want to do is:
```
class {'mongodb::globals':
managepackagerepo => false,
manage_package => false
}
mongodbuser { 'SOMEUSER':
ensure => present,
name => 'SOMEUSER',
passwordhash => mongodbpassword('SOMEUSER', 'SOME_USER'),
database => 'admin',
roles => ['root', 'admin'],
tries => 10
}
```
Well and then you get Empty host component parsing HostAndPort from ":27017"
and realize that all that's missing is just the bind_ip and that you don't want to do anything else with this module but add users... that's where this PR comes in!
This PR will add a default bind_ip of 127.0.0.1. This may be a poor hack because I don't know ruby from an implicit returning hole in the ground :) Either way, lets talk about it? maybe I'm doing something wrong? This PR seems reasonable however.
<!--
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
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.
<!--
Thank you for contributing to this project!
-->
<!--
-->
<!--
Thank you for contributing to this project!
-->
<!--
Replace this comment with a description of your pull request.
-->
<!--
Replace this comment with the list of issues or n/a.
Use format:
Fixes #123
Fixes #124
-->