# playbook to create users on mongoDB using ansible

**URL:** <https://forum.ansible.com/t/playbook-to-create-users-on-mongodb-using-ansible/30489>\
**Category:** Ansible Developer\
**Created:** [June 4, 2019, 4:51pm UTC](https://forum.ansible.com/t/playbook-to-create-users-on-mongodb-using-ansible/30489 "2019-06-04T16:51:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vidyashankar\_Kandgal](https://avatars.discourse-cdn.com/v4/letter/v/90ced4/32.png) [@Vidyashankar\_Kandgal](https://forum.ansible.com/u/Vidyashankar_Kandgal)\
**Post date:** [June 4, 2019, 4:51pm UTC](https://forum.ansible.com/t/playbook-to-create-users-on-mongodb-using-ansible/30489/1 "2019-06-04T16:51:54Z")

</div>

Hi,  
i am trying to create users on mongoDB cluster. i need a Play book with feature for creating users, root user and admin user. Playbook Feature should have option to change password.  
Do we have command line option in playbook. And also can you please explain me wheather the configserver and sharding server will have different user or the user created on mongoDB will have access all servers on cluster.

Thanks and regards,  
Vidyashankar
