Created
April 12, 2019 18:52
-
-
Save crizstian/ca6373a77e99e9019c6361dae31a39c5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DBS=`aws ec2 describe-instances --filters "Name=tag:Name,Values=*Mongo*" --query 'Reservations[].Instances[].PrivateIpAddress' --region $AWS_DEFAULT_REGION` | |
DB1=`echo $DBS | jq .[0] | sed -e 's/"//g'` | |
DB2=`echo $DBS | jq .[1] | sed -e 's/"//g'` | |
DB3=`echo $DBS | jq .[2] | sed -e 's/"//g'` | |
echo "export DB1=${DB1}" >> /etc/environment | |
echo "export DB2=${DB2}" >> /etc/environment | |
echo "export DB3=${DB3}" >> /etc/environment |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment