lib/awstool/instance.rb in awstool-0.1.1 vs lib/awstool/instance.rb in awstool-0.1.2
- old
+ new
@@ -17,17 +17,18 @@
)
end
def launch
+ b = binding
@instance = @compute.servers.create(
image_id: @options['image-id'],
flavor_id: @options['instance-type'],
security_group_ids: @options['security-group-ids'],
subnet_id: @options['subnet-ids'][@options['subnet-id-index']],
key_name: @options['key-name'],
tags: @options['tags'],
- user_data: ERB.new(File.read(@options['userdata'])).result,
+ user_data: ERB.new(File.read(@options['userdata'])).result(b),
block_device_mapping: [
{
'DeviceName' => '/dev/sda1',
'Ebs.VolumeType' => "gp2",
'Ebs.VolumeSize' => @options['rootvol_size'],