# User management and roles-reuse

**URL:** <https://forum.ansible.com/t/user-management-and-roles-reuse/15238>\
**Category:** Ansible Project\
**Tags:** ubuntu\
**Created:** [May 14, 2014, 8:54pm UTC](https://forum.ansible.com/t/user-management-and-roles-reuse/15238 "2014-05-14T20:54:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Francisco\_Reyes](https://avatars.discourse-cdn.com/v4/letter/f/b77776/32.png) [@Francisco\_Reyes](https://forum.ansible.com/u/Francisco_Reyes)\
**Post date:** [May 14, 2014, 8:54pm UTC](https://forum.ansible.com/t/user-management-and-roles-reuse/15238/1 "2014-05-14T20:54:03Z")

</div>

I have a role that sets up “admin users”… On both FreeBSD and Ubuntu.

I would like to expand that role to use it for other users as needed.

Is there a way to over-ride the vars/main.yml file with a different list on a playbook by playbook bases?

So I can create one playbook per user and then limit to what server it is run against.

In summary…  
Existing  
Have a role that adds admins

Desired  
Want to reuse the users role to add other users to specific machines using the users role.

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan1](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Michael\_DeHaan1](https://forum.ansible.com/u/Michael_DeHaan1)\
**Post date:** [May 14, 2014, 10:13pm UTC](https://forum.ansible.com/t/user-management-and-roles-reuse/15238/2 "2014-05-14T22:13:22Z")

</div>

Yes, you can pass variables to roles.

Search for “parameterize” on this page - [http://docs.ansible.com/playbooks\_roles.html#roles](http://docs.ansible.com/playbooks_roles.html#roles)

Though I think you should move your vars to defaults/main.yml instead, if you are doing that – or even consider requiring the list to be passed each time.
