Skip to content

Commit 074d834

Browse files
committed
recipe: make ssh-for-all capture stdout, stderr, rc to table
1 parent 18ac1cf commit 074d834

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Justfile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -817,7 +817,13 @@ ssh-bootstrap HOSTNAME *ARGS:
817817
ssh-for-all *ARGS:
818818
#!/usr/bin/env nu
819819
let nodes = (nix eval --json '.#nixosConfigurations' --apply builtins.attrNames | from json)
820-
$nodes | par-each {|node| just ssh -q $node {{ARGS}}}
820+
$nodes | par-each {|node|
821+
let result = (do -i { ^just ssh -q $node {{ARGS}} } | complete)
822+
{
823+
index: $node,
824+
result: $result
825+
}
826+
}
821827

822828
# Ssh for select
823829
ssh-for-each HOSTNAMES *ARGS:

0 commit comments

Comments
 (0)