Host Inventory Patterns (Many Hosts) Exclude a single host in between

446 views
Skip to first unread message

Christian Schmitt

unread,
Aug 6, 2014, 8:40:09 AM8/6/14
to ansible...@googlegroups.com
Hello is there a way to exclude a host inside a Host pattern in a inventory file?

Example, I have the following inventory:

[hosts]
www[01:50].example.com

is it possible to exclude host 25 ?

Henry Finucane

unread,
Aug 6, 2014, 5:38:18 PM8/6/14
to ansible...@googlegroups.com
You could split it into two lines with 25 missing. If you think you're
going to be doing a lot of special casing, you should consider a
dynamic inventory 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/3df1322e-8181-4a7f-9ce4-fe6aee3865b8%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
-----------------------
| Henry Finucane
| "I hear aphorisms are popular"
-----------------------

Michael DeHaan

unread,
Aug 7, 2014, 5:21:25 PM8/7/14
to ansible...@googlegroups.com
- hosts: this:&that:!those

In the above, the host must be in "this" and "that", but cannot be part of the group named "those".




Reply all
Reply to author
Forward
0 new messages