mercredi 14 octobre 2015

Catching AWS EC2 Instance IPs dynamically

How to catch few AWS EC2 Instances IPs and put them to a script variable if its generates every time randomly and automatically. I was trying to make it with echo "$(curl http://ift.tt/1jpjrkf) master" >> /etc/hosts, but its just the ip of one of them. Also was trying with with aws ec2 describe-instances ... but don't know how to separate clear IP with other information. Any suggestions with awk\sed?




Aucun commentaire:

Enregistrer un commentaire