# maintain users in database

**URL:** <https://forum.ansible.com/t/maintain-users-in-database/16493>\
**Category:** Ansible Developer\
**Created:** [October 13, 2014, 10:59am UTC](https://forum.ansible.com/t/maintain-users-in-database/16493 "2014-10-13T10:59:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ronald\_Rood](https://avatars.discourse-cdn.com/v4/letter/r/43a26b/32.png) [@Ronald\_Rood](https://forum.ansible.com/u/Ronald_Rood)\
**Post date:** [October 13, 2014, 10:59am UTC](https://forum.ansible.com/t/maintain-users-in-database/16493/1 "2014-10-13T10:59:14Z")

</div>

Hi,

I wrote a simple little oracle\_user module in bash that accepts a username and a state (present|absent) that creates or deletes a user depending on the requested state. No action when user exists and state is present, create user when state is present and user does not exist. When user exists and state is absent, drop user and no action when state is absent and user does not exist.  
Quite simple.

In a playbook it looks like:

---

<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:** [October 13, 2014, 8:47pm UTC](https://forum.ansible.com/t/maintain-users-in-database/16493/2 "2014-10-13T20:47:43Z")

</div>

Hi Ronald,

As this is a question bout writing playbooks and such, I think this may better belong on the -project list.

Thanks!
