alphagov/fabric-scripts — pull request #60 by philandstuff (2014-10-13 13:48:08+00:00)
Title: Add "numbered" task to filter hosts by number

This allows you to write things like:

fab staging class:frontend numbered:3 vm.uptime

This didn't work with the way we were using roles, because it works by
mutating the `env.hosts` value which was empty. In order to get this to
work, I changed the way the `all`, `class` and `vdc` tasks work to add
hosts directly to `env.hosts`.

Based on discussion in #55, it would be useful to have a task like this. Combined with a machine class that fetches a list of all machines which are safe to reboot (which @samjsharpe seems to be working on), this could make rebooting machines much nicer.