Multiple patterns for hosts?

I’m trying to monitor clusters of hosts, all of which have 2 nodes.
Their hostnames are host200-n1 for 1st node and host200-n2 for the 2nd node and so on.
For this I wanted to use the following pattern in my hosts file:
host[100:200]-n[1:2].example.com

This does not seem to work.
As a workaround I’ve defined:
host[100:200]-n1.example.com
host[100:200]-n2.example.com

Thanks,
Y.

You are correct. This is not a bug.

You can only use one host pattern, and we’ve only documented things that do work, so coming up with alternative syntaxes will not :slight_smile:

Also wanted to point out, seeing you appear to have a lot of hosts, you may also be interested in sourcing your inventory from a dynamic inventory script.

You don’t have to define them in that one particular format if they already exist somewhere else, or if you want to import from cloud storage or some other database, etc.