I extended Fabric to make it easier to specify the servers.
I call the modified Fabric FastHandle.
$ H=192.168.0.10 $ fab -H $H -- hostname
$ fab -H 192.168.0.10 -- hostname $ fab -H 192.168.0.10 test.test
$ echo 192.168.0.10 | fab -- hostname $ echo 192.168.0.10 | fab test.test
$ H=192.168.0.10,192.168.0.11 $ fab -H $H -- hostname
$ fab -H 192.168.0.10,192.168.0.11 -- hostname $ fab -H 192.168.0.10,192.168.0.11 test.test
$ echo "192.168.0.10\n192.168.0.11" | fab -- hostname $ echo "192.168.0.10\n192.168.0.11" | fab test.test $ echo 192.168.0.10\\n192.168.0.11 | fab -- hostname
$ vi tmp 192.168.0.1 test-web-01 192.168.0.1 test-web-02 $ cat tmp | fab test.test
$ cat hosts/test 192.168.0.1 test-web-01 192.168.0.2 test-web-02 192.168.0.3 test-web-03 192.168.0.4 test-web-04 192.168.0.5 test-web-05 ..... 192.168.0.98 test-web-98 192.168.0.99 test-web-99 $ $ fhghost.sh test-web hosts/test | fab test.test $ fhghost.sh hosts/test | fab test.test
Check $FHHOME/fhscripts/fhghost.sh
operation