# how to remove user from a group

**URL:** <https://forum.ansible.com/t/how-to-remove-user-from-a-group/12805>\
**Category:** Ansible Project\
**Created:** [May 14, 2013, 11:38am UTC](https://forum.ansible.com/t/how-to-remove-user-from-a-group/12805 "2013-05-14T11:38:36Z")\
**Posts on this page:** 2\
**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 14, 2013, 11:38am UTC](https://forum.ansible.com/t/how-to-remove-user-from-a-group/12805/1 "2013-05-14T11:38:36Z")

</div>

Hi all,

I'm tryning to remove user from group if the user is in the group.  
The user module is not able to do this normal way, there is no flag user  
should not be in this group.

In my scenarios the users are in several roles. The roles means be in the  
group.

&nbsp;&nbsp;Best regards  
&nbsp;&nbsp;&nbsp;&nbsp;Peter

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan2](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@Michael\_DeHaan2](https://forum.ansible.com/u/Michael_DeHaan2)\
**Post date:** [May 14, 2013, 12:18pm UTC](https://forum.ansible.com/t/how-to-remove-user-from-a-group/12805/2 "2013-05-14T12:18:08Z")

</div>

You can use the user module with append=no

[http://ansible.cc/docs/modules.html#user](http://ansible.cc/docs/modules.html#user)
