host_range

Make lists of hosts using ranges like:

  • foo-.domain.com

  • bar-[1-3,6-9].domain.com

Library Usage

require ‘host_range’ hosts = HostRange.parse(‘foo-.domain.com’)

Command-line Usage

Commandline tool lists hosts, or execs commands on them in a loop:

  • hr -h

  • hr foo-.domain.com

  • hr foo-.domain.com -e ssh root@{} hostname

Can provide a config file (~/.hr.yaml) with predefined patterns called by name.

Copyright © 2011 Richard Lister. See LICENSE.txt for further details.