host range

A shorthand in an inventory where [start:end] in a host name expands into one host per number or letter in the range.

In more detail

web[1:3].example.com becomes web1, web2 and web3. It saves typing and copy-paste mistakes, and works in both INI and YAML inventories. Check the expansion with ansible-inventory --graph.

Related terms

Taught in

References

Certification courses