initial import
[awsible] / roles / common / files / awsible.sh
1 # configure environment with AWS info
2 export INSTANCE_ID=`curl -s http://169.254.169.254/latest/meta-data/instance-id`
3 export PUBLIC_HOSTNAME=`curl -s http://169.254.169.254/latest/meta-data/public-hostname`
4 export PUBLIC_IP=`curl -s http://169.254.169.254/latest/meta-data/public-ipv4`
5 export PRIVATE_IP=`curl -s http://169.254.169.254/latest/meta-data/local-ipv4`
6 export EC2_AZ=`curl -s http://169.254.169.254/latest/meta-data/placement/availability-zone/`
7 TMP="${#EC2_AZ}"
8 export EC2_REGION="${EC2_AZ:0:$TMP-1}"
9 unset TMP
10 # export CLOUD_ACCOUNT=awsAcctName...
11 # export CLOUD_MODULE=mytags['tags']['module']|default('(no module)')
12 # export CLOUD_STACK=stack|None
13 # export CLOUD_PHASE=mytags['tags']['phase']|default('None')
14
15 # export CLOUD_AUTO_SCALE_GROUP=
16 # export CLOUD_LAUNCH_CONFIG=module-stack-country-phase-version