# Flexible user and group management

**URL:** <https://forum.ansible.com/t/flexible-user-and-group-management/13909>\
**Category:** Ansible Project\
**Created:** [November 14, 2013, 7:29pm UTC](https://forum.ansible.com/t/flexible-user-and-group-management/13909 "2013-11-14T19:29:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nick\_G](https://avatars.discourse-cdn.com/v4/letter/n/f475e1/32.png) [@Nick\_G](https://forum.ansible.com/u/Nick_G)\
**Post date:** [November 14, 2013, 7:29pm UTC](https://forum.ansible.com/t/flexible-user-and-group-management/13909/1 "2013-11-14T19:29:18Z")

</div>

We have a fleet of systems that are collected into groups that perform different roles and we need to manage user accounts across those systems. I would like to manage this as cleanly as possible. Here is what I would like to do:

I would like to put the details about users (login, uid, ssh-key, etc) and groups (name, gid) into the group\_vars/all file so it’s all in one place.

Also in group\_vars/all I would like to collect the users into functional groups (where a user can be in one or more groups).

Then, in the group\_vars/\<host\_group\> files (one for each collection of hosts) I would like to define which groups of users should be provisioned on that host\_group.

Here’s what my group\_vars/all file looks like:
