<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Hostname on Evan Hoffman</title><link>https://evan.wtf/tags/hostname/</link><description>Recent content in Hostname on Evan Hoffman</description><generator>Hugo</generator><language>en-US</language><copyright>Evan Hoffman</copyright><lastBuildDate>Mon, 19 May 2014 15:24:09 +0000</lastBuildDate><atom:link href="https://evan.wtf/tags/hostname/index.xml" rel="self" type="application/rss+xml"/><item><title>Setting hostname in an EC2 instance from the name tag</title><link>https://evan.wtf/2014/05/19/setting-hostname-in-an-ec2-instance-from-the-name-tag/</link><pubDate>Mon, 19 May 2014 15:24:09 +0000</pubDate><guid>https://evan.wtf/2014/05/19/setting-hostname-in-an-ec2-instance-from-the-name-tag/</guid><description>&lt;pre tabindex="0"&gt;&lt;code&gt;# pip install awscli&#10;# HOSTNAME=`aws ec2 describe-tags --region us-east-1 --filters Name=resource-id,Values=`curl http://169.254.169.254/latest/meta-data/instance-id 2&amp;gt; /dev/null` Name=key,Values=Name --output text --query &amp;#39;Tags[*].Value&amp;#39;`&#10;# hostname $HOSTNAME&#10;# hostname &amp;gt; /etc/hostname&#10;&lt;/code&gt;&lt;/pre&gt;</description></item></channel></rss>