# How do I remove host-group "all"

**URL:** <https://forum.ansible.com/t/how-do-i-remove-host-group-all/15566>\
**Category:** Ansible Project\
**Created:** [June 27, 2014, 3:24pm UTC](https://forum.ansible.com/t/how-do-i-remove-host-group-all/15566 "2014-06-27T15:24:48Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eric\_Wedaa](https://avatars.discourse-cdn.com/v4/letter/e/c0e974/32.png) [@Eric\_Wedaa](https://forum.ansible.com/u/Eric_Wedaa)\
**Post date:** [June 27, 2014, 3:24pm UTC](https://forum.ansible.com/t/how-do-i-remove-host-group-all/15566/1 "2014-06-27T15:24:48Z")

</div>

For assorted reasons I want to remove or rename the host-group “all”. I’ve googled this already and couldn’t find it.

Can somebody tell me what file(s) to edit? (I grep’d the tree but can’t find a reasonable place to start).

Failing this, then I guess I have to write a wrapper script which I’d rather not do since the fundamental problem will still exist for anybody who runs the /usr/bin/ansible instead of the script.

---

<div class="post-metadata">

**Author:** ![Brian\_Coca1](https://avatars.discourse-cdn.com/v4/letter/b/278dde/32.png) [@Brian\_Coca1](https://forum.ansible.com/u/Brian_Coca1)\
**Post date:** [June 27, 2014, 4:14pm UTC](https://forum.ansible.com/t/how-do-i-remove-host-group-all/15566/2 "2014-06-27T16:14:51Z")

</div>

this is hardcoded into ansible, that and 'ungrouped’​ are both part of the inventory api.

---

<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:** [June 27, 2014, 4:15pm UTC](https://forum.ansible.com/t/how-do-i-remove-host-group-all/15566/3 "2014-06-27T16:15:15Z")

</div>

May I ask why?

Perhaps you speak a particular language where “all” is a very offensive curse word? I’m guessing that’s not it.

Honestly, it doesn’t make a lot of sense to me and is rather fundamental to ansible that all groups have a parent group.

We’re only going to support questions about unmodified Ansibles, of course.

---

<div class="post-metadata">

**Author:** ![Eric\_Wedaa](https://avatars.discourse-cdn.com/v4/letter/e/c0e974/32.png) [@Eric\_Wedaa](https://forum.ansible.com/u/Eric_Wedaa)\
**Post date:** [June 27, 2014, 4:22pm UTC](https://forum.ansible.com/t/how-do-i-remove-host-group-all/15566/4 "2014-06-27T16:22:35Z")

</div>

Because there’s a certain level of paranoia where I am. If we HAVE to specify an existing group, then that at least slows down somebody from running a command against ALL our servers.

---

<div class="post-metadata">

**Author:** ![Brian\_Coca1](https://avatars.discourse-cdn.com/v4/letter/b/278dde/32.png) [@Brian\_Coca1](https://forum.ansible.com/u/Brian_Coca1)\
**Post date:** [June 27, 2014, 4:29pm UTC](https://forum.ansible.com/t/how-do-i-remove-host-group-all/15566/5 "2014-06-27T16:29:20Z")

</div>

split your inventory into discrete groups, even if they run all, it will  
only include the specific inventory.

also, for that kind of fine grained access control, you might want to look  
at tower.

---

<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:** [June 28, 2014, 5:53pm UTC](https://forum.ansible.com/t/how-do-i-remove-host-group-all/15566/6 "2014-06-28T17:53:40Z")

</div>

Yep, another method might be to have an external inventory script that took an environment variable parameter.

For instance

ANSIBLE\_CUSTOMER\_ID=27 ansible-playbook foo.yml -i /path/to/inventory\_source

The script would of course never serve up all of your inventory at once.

You could set up an alias to save some typing too.
