mirror of
https://github.com/jpetazzo/container.training.git
synced 2026-03-03 01:40:19 +00:00
The former VM deployment process relied on extra scripts located in a (private) repo. The new process is standalone.
23 lines
513 B
Plaintext
Executable File
23 lines
513 B
Plaintext
Executable File
# This file can be sourced in order to directly run commands on
|
|
# a batch of VMs whose IPs are located in ips.txt of the directory in which
|
|
# the command is run.
|
|
|
|
pssh () {
|
|
HOSTFILE="ips.txt"
|
|
|
|
[ -f $HOSTFILE ] || {
|
|
echo "No hostfile found at $HOSTFILE"
|
|
return
|
|
}
|
|
|
|
echo "[parallel-ssh] $@"
|
|
|
|
parallel-ssh -h $HOSTFILE -l ubuntu \
|
|
--par 100 \
|
|
-O LogLevel=ERROR \
|
|
-O UserKnownHostsFile=/dev/null \
|
|
-O StrictHostKeyChecking=no \
|
|
-O ForwardAgent=yes \
|
|
"$@"
|
|
}
|