Vagrantfile:
require 'json'
file = File.read('blueprint.json')
azure_data = JSON.parse(file)
Vagrant.configure('2') do |config|
config.vm.define "master" do |node|
node.vm.provider :azure do |azure, override|
azure_data.each do |hash|
hash.each do |key, value|
azure[key] = value
end
end
azure.vm_name = "somename"
end
end
end
vagrant up
gives this error:
Microsoft Azure Provider:
* The following settings shouldn't exist: []
Also, if I add puts('something')
into the hash.each
loop, it gets output not once per each property of JSON file, but 6 times (¿?) per each property
blueprint.json:
{
"admin_username":"someuser",
"location":"northeurope",
"resource_group_name":"resourcegroup",
"tcp_endpoints":"5000",
"virtual_network_name":"vnetname",
"vm_size":"Standard_DS1"
}