# merging of groups

**URL:** <https://forum.ansible.com/t/merging-of-groups/13280>\
**Category:** Ansible Project\
**Created:** [August 11, 2013, 1:14am UTC](https://forum.ansible.com/t/merging-of-groups/13280 "2013-08-11T01:14:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yves\_Dorfsman](https://avatars.discourse-cdn.com/v4/letter/y/9de0a6/32.png) [@Yves\_Dorfsman](https://forum.ansible.com/u/Yves_Dorfsman)\
**Post date:** [August 11, 2013, 1:14am UTC](https://forum.ansible.com/t/merging-of-groups/13280/1 "2013-08-11T01:14:15Z")

</div>

When I have a host in two different group and apply a play against both groups, the task is repeated on that group. eg:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[krbclient]  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;hosta  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;hostb

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[nfsclient]  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;hostb  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;hostc

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[nfsserver]  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;hostd

When I run a play such as:  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- hosts: krbclient:nfsclient  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;roles:  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- setupusers

That role will be applied twice to hostb. It doesn't break anything, the second time they run, they just show "ok", but it wastes time.

Shouldn't the groups be merged to avoid this?

---

<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:** [August 11, 2013, 12:06pm UTC](https://forum.ansible.com/t/merging-of-groups/13280/2 "2013-08-11T12:06:51Z")

</div>

Pretty darn sure Ansible doesn’t do this?

How did you observe this feature?

(ansible --version and output with a very minimal please?)

- hosts: groupA:groupB  
tasks:
- action: ping

Looks fine to me.
