mirror of
https://github.com/status-im/ansible-role-mongodb.git
synced 2025-01-10 05:25:44 +00:00
4b2899bb6e
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/