StackStorm / ansible-st2

Ansible Roles and Playbooks to deploy StackStorm
https://galaxy.ansible.com/StackStorm/stackstorm/
Apache License 2.0
100 stars 75 forks source link

Mongo Auth | Check mongo config to see if auth is enabled or configured #206

Closed cognifloyd closed 4 years ago

cognifloyd commented 6 years ago

Before adding any users, including the admin user, we need to know if authentication is already enabled in the running instance of mongodb. For a truly idempotent playbook, the playbook needs to be able to run both before authentication is enabled and after it is enabled. So, we need to figure out if mongo has auth enabled and if users are configured. Even after mongo is restarted with auth enabled, the check task will still succeed until users are added due to the localhost exception[1].

[1] https://docs.mongodb.com/manual/core/security-users/#localhost-exception

cognifloyd commented 4 years ago

Checks are green. Please review and merge.