tkuchikiの日記

新ブログ https://blog.tkuchiki.net

2014-05-31から1日間の記事一覧

ec2 instance の name tag と private ip を /etc/hosts に追記する

aws ec2 describe-instances が返す json を parse して、 /etc/hosts に private ip, name tag を追記するスクリプトです(name tag を hostname としてる場合を想定しています)。 aws configure をしている前提で書いていますが、 そうでない場合は、適宜 r…