community.mongodb
community.mongodb copied to clipboard
Create mongodb_role module
SUMMARY
A missing module?
https://github.com/ansible-collections/community.mongodb/issues/404
The mongodb_user module can probably provide a good hint on how to start.
https://docs.mongodb.com/manual/reference/command/createRole/
This would be a good first issue for a new contributor. We would also expect integration tests to be written. These could also be based on the int tests for the mongodb_user module.
I need to check on a few things but might be able to pick this up as we have a need for this functionality.
Please do. I'm available for any help required.
Cheers,
Rhys
So, its really need thing, because mongo >= 6.0 can't do backup with backup
builtin role. We have to create custom role.
Hello @superset1,
Until someone takes it on you can use the mongodb_shell module as a workaround.
Cheers,
Rhys
A mongodb_role module has just been merged in https://github.com/ansible-collections/community.mongodb/pull/530
Community feedback would be good before release as this has been thrown together pretty quickly. The goal is not to provide 100% coverage of all role related functionality but rather the common tasks. It's possible to add, remove and update roles. Please check the EXAMPLES block in https://github.com/ansible-collections/community.mongodb/blob/master/plugins/modules/mongodb_role.py or the integration tests https://github.com/ansible-collections/community.mongodb/blob/master/tests/integration/targets/mongodb_role/tasks/main.yml for usage examples
Will be in 1.5.0 release