# help with user managment, migrating from puppet

**URL:** <https://forum.ansible.com/t/help-with-user-managment-migrating-from-puppet/12772>\
**Category:** Ansible Project\
**Created:** [May 6, 2013, 7:10am UTC](https://forum.ansible.com/t/help-with-user-managment-migrating-from-puppet/12772 "2013-05-06T07:10:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hudec\_Peter](https://avatars.discourse-cdn.com/v4/letter/h/a87d85/32.png) [@Hudec\_Peter](https://forum.ansible.com/u/Hudec_Peter)\
**Post date:** [May 6, 2013, 7:10am UTC](https://forum.ansible.com/t/help-with-user-managment-migrating-from-puppet/12772/1 "2013-05-06T07:10:41Z")

</div>

Hi all,

I'm migrating form puppet. The last playbook/manifest which is missing is  
the user management.

On the puppet I wroute module and some libs an it worked like this

I habe list of pall users in some array  
users\_list\_all: user01, user02, user03, user04

For each server I have list of enabled users, this could be done by  
host\_vars in ansible  
users\_enabled: user01, user03

If you add the user to the "users\_enabled", the user is created. So far so  
good.

And now the tricky part. If you remove the user from the user\_enabled, the  
user is removed, so the ansible script should be able to check  
- If the users in "user\_enabled" array do exists, if not crete them  
- if the users in "user\_s\_list\_all" - "users\_enabled" do not exists, if  
exists remove them

Please could anybody help me to solve this tricky problem? I' managing  
couple of server, where no all users have access to all servers.

&nbsp;&nbsp;best regards  
&nbsp;&nbsp;&nbsp;&nbsp;Peter Hudec
