lib/zergrush_vagrant/renderer.rb in zergrush_vagrant-0.0.3 vs lib/zergrush_vagrant/renderer.rb in zergrush_vagrant-0.0.4
- old
+ new
@@ -84,11 +84,11 @@
# provider type
provider = last_defined_driveroption["providertype"]
# unique name
- unique_name = "zergling_#{index}_#{SecureRandom.hex(20)}"
+ unique_name = "zergling-#{index}-#{Digest::SHA1.hexdigest("#{@name}#{provider}#{last_defined_vm["basebox"]}#{@hive_location}")}"
# render provider details to string
provider_specifics = ""
if provider == "aws"
@@ -254,9 +254,10 @@
# tasks array rendered to ruby string. double encoding to escape quotes and allow for variable expansion
tasks_array = last_defined_vm["tasks"].to_json.to_json
sources = {
:machine_name => "zergling_#{index}",
+ :node_name => unique_name,
:basebox_path => last_defined_vm["basebox"],
:box_name => Digest::SHA1.hexdigest("#{@name}#{provider}#{last_defined_vm["basebox"]}"),
:provider => provider,
:provider_specifics => provider_specifics,
:networks_array => network_specifics,