How do I remove host-group "all"

395 views
Skip to first unread message

Eric Wedaa

unread,
Jun 27, 2014, 11:24:48 AM6/27/14
to ansible...@googlegroups.com
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.

>>>>Ericw

Brian Coca

unread,
Jun 27, 2014, 12:14:56 PM6/27/14
to ansible...@googlegroups.com
this is hardcoded into ansible, that and 'ungrouped'​ are both part of the inventory api.

Michael DeHaan

unread,
Jun 27, 2014, 12:15:18 PM6/27/14
to ansible...@googlegroups.com
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.


--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/f8c70208-f96e-4cfb-878d-9ee4eb272982%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Eric Wedaa

unread,
Jun 27, 2014, 12:22:35 PM6/27/14
to ansible...@googlegroups.com
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. 

Brian Coca

unread,
Jun 27, 2014, 12:29:23 PM6/27/14
to ansible...@googlegroups.com
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.

--
Brian Coca
Stultorum infinitus est numerus
0110000101110010011001010110111000100111011101000010000001111001011011110111010100100000011100110110110101100001011100100111010000100001
Pedo mellon a minno

Michael DeHaan

unread,
Jun 28, 2014, 1:53:43 PM6/28/14
to ansible...@googlegroups.com
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.


--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages