The majority of the servers I look after are managed by puppet, but we have a suite of 10 older servers which fall outside of that management environment.
We’re slowly replacing them with Shiny! New! Managed! Servers! ™ but until we’ve completed that work we’re stuck with limited management tools, doing things manually at the command line, like it’s still the 20th century
Occasionally we need to do the same thing on every server (eg kick off a “yum update” or whatever) and using ssh to connect to them all one at a time is tedious.
So, we use cssh which is a
scary… dangerous… “powerful” tool that spawns a load of ssh sessions and allows you to send the same keypresses to all the servers at once. I don’t like using it, it feels like a really dirty way to admin a bunch of hosts, but sometimes it’s a necessary evil.
As long as you’re careful what you type, and don’t do anything daft like “sudo bash” then you can keep a lid on the fear.
One of the “features” of this bundle of 10 servers is that they’re dual stack IPv4 and IPv6, but ssh is only accepting connections on the IPv4 address.
If you’re connecting to these one at a time, “ssh -4 server.name.bris.ac.uk” will sort that out for you, but it took a little more rummaging in man pages to come up with the cssh alternative, and that’s the real purpose of this post.
To force cssh to use IPv4 when connecting to a bunch of hosts, use:
cssh --options="-o AddressFamily=inet" <host list>
 Other config management systems are available 🙂
 To be fair, sometimes it’s also useful to kick off a puppet run everywhere
Since you are using Puppet, did you consider/tried using MCollective for this task?
mcollective is on our roadmap, and we’ve had a couple of attempts at getting it going so far, but more important things keep coming along which suck up spare time and push it back down the todo list :/
We’ll get there with mcollective at some point, but for various reasons the scope of our mcollective environment is likely be limited to our puppet managed servers.
There are plenty of other ways to slice the problem as well, fabric is used extensively elsewhere in IT-Services for example.