#!/bin/bash
set -e

DISCOVERY_IP=$1
UUID=$(uuidgen)

curl -X PUT http://${DISCOVERY_IP}:2379/v2/keys/discovery/${UUID}/_config/size -d value=3

echo "token=${UUID}"

#!/bin/bash
set -e

DISCOVERY_IP="$1"
TOKEN_PATH="v2/keys/discovery"
UUID="$(uuidgen)"

curl -X PUT http://${DISCOVERY_IP}:2379/${TOKEN_PATH}/${UUID}/_config/size -d value=3

echo "ETCD_DISCOVERY=http://${DISCOVERY_IP}:2379/${TOKEN_PATH}/${UUID}"

Change echo to full variable definition
Change echo to full variable definition
