diff --git a/README.md b/README.md index 53bd73b..b31346c 100644 --- a/README.md +++ b/README.md @@ -246,7 +246,8 @@ be available at your [MMS Settings page](https://mms.mongodb.com/settings). An optional recipe is `mongodb::user_management` which will enable authentication in the configuration file by default and create any users in the `node['mongodb']['users']`. The users array expects a hash of username, password, roles, and database. Roles should be -an array of roles the user should have on the database given. +an array of roles the user should have on the database given. An optional action, `add`, `modify` +or `delete` may also be specified. If no action is specified, it will default to `add`. By default, authentication is not required on the database. This can be overridden by setting the `node['mongodb']['config']['auth']` attribute to true in the chef json. diff --git a/recipes/user_management.rb b/recipes/user_management.rb index c390af5..f8d23c4 100644 --- a/recipes/user_management.rb +++ b/recipes/user_management.rb @@ -16,6 +16,6 @@ roles user['roles'] database user['database'] connection node['mongodb'] - action :add + action user['action'] or :add end end