Trolli Schmittlauch
f14b290937
- manually inspected changes of "workmac" branch - modularised out some config parts into modules
20 lines
462 B
Nix
20 lines
462 B
Nix
{ pkgs, ... }:
|
|
''
|
|
ssh-loop () {
|
|
setopt shwordsplit
|
|
local hosts=$1
|
|
local cmd=$2
|
|
|
|
for x in $1; do echo $x; ${pkgs.openssh}/bin/ssh $x.fcio.net -o StrictHostKeyChecking=no -C "$2"; done
|
|
}
|
|
|
|
ssh-loop-parallel () {
|
|
setopt shwordsplit
|
|
local hosts=$1
|
|
local cmd=$2
|
|
|
|
for x in $1; do echo $x; ${pkgs.openssh}/bin/ssh $x.fcio.net -o StrictHostKeyChecking=no -C "$2" 2>&1 | sed -e "s/^/$x: /;" & done
|
|
wait
|
|
}
|
|
''
|