open-nomad/e2e/bin/run
2019-06-04 15:52:32 -04:00

16 lines
376 B
Bash
Executable file

#!/bin/bash
set -e
if [ "$1" == "" ]; then
echo "./run.sh commands..."
exit 1
fi
nodes=$(terraform output -json -state=terraform/terraform.tfstate | jq -r '(.clients,.servers).value[]')
for node in $nodes
do
echo Executing: ssh -i terraform/keys/*.pem ubuntu@$node "$@"
ssh -o StrictHostKeyChecking=accept-new -i terraform/keys/*.pem ubuntu@$node "$@"
done