Skip to content

Instantly share code, notes, and snippets.

@xxx
Created March 22, 2013 06:20
Show Gist options
  • Save xxx/5219363 to your computer and use it in GitHub Desktop.
Save xxx/5219363 to your computer and use it in GitHub Desktop.
function eyserver {
local ey_env=$1
local server_scope=$2
if [ "$ey_env" = "" ]; then
ey_env="stipple_prod"
fi
if [ "$server_scope" = "" ]; then
server_scope="--all"
fi
# See http://docs.amazonwebservices.com/AWSEC2/latest/UserGuide/AESDG-chapter-instancedata.html
# for more info.
ey ssh "echo \`hostname\` \`curl -s http://169.254.169.254/latest/meta-data/instance-id\` \`curl -s http://169.254.169.254/latest/meta-data/public-hostname\`" -e $ey_env $server_scope
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment