Add the mongodb_storage_dirperdb variable to the defaults (set to false)
Add the variable unconditionally into the mongod_init.conf.j2 and
mongod.conf.j2 templates.
Commit #d9393b1 did not completely fixed the systemd-related issues.
The handler "reload systemd" has a "when" clause which fails in
systemd-based systems.
This commit attempts to fix the problem described above. The "when"
clause in the handler "reload systemd" has been fixed. Some facts has
been added in the install playbook, in order to make the code more
simple and easier to maintain.
This provides initial support for installing the relevant MongoDB
packages for a RedHat based OS. This currently only supports RHEL/CentOS
6 in order to keep the initial scope relatively constrained.
According to MongoDB documentation[1], "enabling internal authentication
(in a replicaset) enables access control". Therefore, if MongoDB is
configured without authentication (`auth = no`) a `keyFile` line
must not appear in the configuration file.
This commit attempts to solve the problem described above. An extra
check has been added to ensure the `keyFile` configuration option is
added only if replicaset authorization _and_ authentication is enabled.
[1]: https://docs.mongodb.org/v3.0/tutorial/enable-internal-authentication/