tag:blogger.com,1999:blog-9238405.post217020473148446889..comments2024-03-18T02:04:50.380-07:00Comments on Agile Testing: Passing user data to EC2 Ubuntu instances with libcloudGrig Gheorghiuhttp://www.blogger.com/profile/17863511617654196370noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-9238405.post-66224589182723677242011-01-20T08:29:23.006-08:002011-01-20T08:29:23.006-08:00Hi Marius -- thanks for the comment. You're ri...Hi Marius -- thanks for the comment. You're right, open(filename).read() is a better solution. As far as 'coolstuff' it was just a test for my user data script, I wanted to see that 'stuff' happens at boot time when I launch the new instance. In real life I would add it either to /etc/hosts, or to DNS.Grig Gheorghiuhttps://www.blogger.com/profile/17863511617654196370noreply@blogger.comtag:blogger.com,1999:blog-9238405.post-46379242611477386402011-01-20T04:49:26.306-08:002011-01-20T04:49:26.306-08:00I recommend
userdata_contents = open(userdata_fil...I recommend<br /><br />userdata_contents = open(userdata_file).read()<br /><br />It is simpler and doesn't insert new blank lines between every two lines of text.<br /><br />Also, I wonder if you need to add 'coolstuff' to /etc/hosts. Or is it a standin for a name that's actually DNS-resolvable?Anonymousnoreply@blogger.com