Skip to content

Commit

Permalink
use jq in path
Browse files Browse the repository at this point in the history
  • Loading branch information
warroyo committed May 22, 2019
1 parent 1e14657 commit af96da9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tasks/master-instances.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ run:
gcloud auth activate-service-account --key-file ./gcp_account.key.json
GCP_ZONE=$(./jq -r .azs[0] terraform-output/metadata)
echo "getting master instances"
MASTER_INSTANCE_ID=$(gcloud compute ssh --quiet --force-key-file-overwrite --zone "${GCP_ZONE}" ubuntu@sandbox-opsman -- $BOSH_CMD -d service-instance_${CLUSTER_UUID} vms --json | ./jq -r -c '.Tables[0].Rows[] | select(.instance | startswith("master")) | .vm_cid')
MASTER_INSTANCE_ID=$(gcloud compute ssh --quiet --force-key-file-overwrite --zone "${GCP_ZONE}" ubuntu@sandbox-opsman --command "$BOSH_CMD -d service-instance_${CLUSTER_UUID} vms --json | jq -r -c '.Tables[0].Rows[] | select(.instance | startswith(\"master\")) | .vm_cid')"
# ./jq -r .ops_manager_ssh_private_key terraform-output/metadata > ops_manager_ssh_private_key.pem
# chmod 600 ops_manager_ssh_private_key.pem
# MASTER_INSTANCE_ID=$(ssh -oStrictHostKeyChecking=accept-new -oUserKnownHostsFile=/dev/null ubuntu@${OM_HOST} -i ops_manager_ssh_private_key.pem $BOSH_CMD -d service-instance_${CLUSTER_UUID} vms --json | ./jq -r -c '.Tables[0].Rows[] | select(.instance | startswith("master")) | .vm_cid')
Expand Down

0 comments on commit af96da9

Please sign in to comment.