github.com/hernad/nomad@v1.6.112/e2e/bin/update (about)

     1  #!/usr/bin/env bash
     2  
     3  if [ $# -ne 2 ]; then
     4      echo "./upload.sh <source> <destination>"
     5      exit 1
     6  fi
     7  
     8  set -e
     9  
    10  nodes=$(terraform output -json -state=terraform/terraform.tfstate | jq -r '(.linux_clients,.servers).value[]')
    11  for node in $nodes
    12  do
    13      echo Executing: scp -C -i terraform/keys/*.pem "$1" ubuntu@"$node":"$2"
    14      # scp -o StrictHostKeyChecking=accept-new -C -i terraform/keys/*.pem "$1" ubuntu@"$node":"$2"
    15      scp -o StrictHostKeyChecking=accept-new -C -i terraform/keys/*.pem "$1" ubuntu@"$node":/tmp/uploaded
    16      ssh -i terraform/keys/*.pem ubuntu@"$node" sudo mv /tmp/uploaded "$2"
    17  done