# Managing users at global, group and host levels

**URL:** <https://forum.ansible.com/t/managing-users-at-global-group-and-host-levels/16735>\
**Category:** Ansible Project\
**Created:** [November 10, 2014, 7:55pm UTC](https://forum.ansible.com/t/managing-users-at-global-group-and-host-levels/16735 "2014-11-10T19:55:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rishi](https://avatars.discourse-cdn.com/v4/letter/r/90db22/32.png) [@Rishi](https://forum.ansible.com/u/Rishi)\
**Post date:** [November 10, 2014, 7:55pm UTC](https://forum.ansible.com/t/managing-users-at-global-group-and-host-levels/16735/1 "2014-11-10T19:55:46Z")

</div>

I am trying to come up with a scheme for managing users on boxes. I want to be able to selectively choose users at a global, group and host level and then also who is admins (with sudo access basically) on each box at each level as well.

One of the ideas I was thinking was a pattern such as this, each of these vars would be in group\_vars/all.yml, group.yml or host.yml .

users\_global\_list:

- username: …  
sshkey: …  
etc…

(same format as above)  
users\_group\_list:  
users\_host\_list:

And then for admins make a separate list for each level  
users\_global\_admins: [bob, sally]  
users\_group\_admins: [john]  
users\_host\_admins:

The playbook would create users first and then a add the groups needed to be an “admin” on the box. I wanted to get some opinions on this and see if it seems like the right approach and managable.
