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