Skip to content

Commit

Permalink
Merge pull request #1 from mpenate/fix/remove-jq
Browse files Browse the repository at this point in the history
@MPenate Thank you very much mate!
  • Loading branch information
albertostratio authored Mar 17, 2017
2 parents c179f7a + f49a510 commit cac2f43
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions run
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,10 @@ case "$MODE" in
;;
esac

if [ -n "${VAULT_TOKEN-}" ] && [ -n "${VAULT_HOST-}" ] && [ -n "${VAULT_PORT-}" ] && [ -n "${VAULT_PATH-}" ]; then
export MARATHON_LB_USER=$(curl -k -L -H "X-Vault-Token:$VAULT_TOKEN" "https://$VAULT_HOST:$VAULT_PORT$VAULT_PATH" -s | jq -r ".data .\"user\"")
export MARATHON_LB_PASSWORD=$(curl -k -L -H "X-Vault-Token:$VAULT_TOKEN" "https://$VAULT_HOST:$VAULT_PORT$VAULT_PATH" -s | jq -r ".data .\"pass\"")
export CREDENTIALS="$MARATHON_LB_USER:$MARATHON_LB_PASSWORD"
if [ -n "${VAULT_TOKEN-}" ] && [ -n "${VAULT_HOST-}" ] && [ -n "${VAULT_PORT-}" ] && [ -n "${VAULT_PATH-}" ]; then
MARATHON_LB_PASSWORD=$(curl -k -L -H "X-Vault-Token:$VAULT_TOKEN" "$VAULT_URL" -s| python -m json.tool | python -c 'import json,sys;obj=json.load(sys.stdin);print obj["data"]["pass"]')
MARATHON_LB_USER=$(curl -k -L -H "X-Vault-Token:$VAULT_TOKEN" "$VAULT_URL" -s | python -m json.tool | python -c 'import json,sys;obj=json.load(sys.stdin);print obj["data"]["user"]')
CREDENTIALS="$MARATHON_LB_USER:$MARATHON_LB_PASSWORD"
ARGS="$ARGS --auth-credentials $CREDENTIALS"
fi

Expand Down

0 comments on commit cac2f43

Please sign in to comment.