1 # configure environment with AWS info
3 export INSTANCE_ID=`curl -sf http://169.254.169.254/latest/meta-data/instance-id`
4 if ! export PUBLIC_HOSTNAME=`curl -sf http://169.254.169.254/latest/meta-data/public-hostname`
6 export PUBLIC_HOSTNAME=''
8 if ! export PUBLIC_IP=`curl -sf http://169.254.169.254/latest/meta-data/public-ipv4`
12 export PRIVATE_IP=`curl -sf http://169.254.169.254/latest/meta-data/local-ipv4`
13 export EC2_AZ=`curl -sf http://169.254.169.254/latest/meta-data/placement/availability-zone/`
15 export EC2_REGION="${EC2_AZ:0:$TMP-1}"
18 # hard-code here for systems without userdata
19 export CLOUD_ACCOUNT={{ ACCT_NAME }}
20 export CLOUD_MODULE={{ my_tags['tags']['module']|default('(no module)') }}
21 export CLOUD_STACK={{ my_tags['tags']['stack']|default() }}
22 export CLOUD_PHASE={{ my_tags['tags']['phase']|default('None') }}
23 export CLOUD_AUTO_SCALE_GROUP={{ my_tags['tags']['aws:autoscaling:groupName']|default() }}
24 # export CLOUD_LAUNCH_CONFIG=module-stack-country-phase-version