diff options
author | Yuya Kusakabe <yuya.kusakabe@gmail.com> | 2017-01-12 11:42:40 +0900 |
---|---|---|
committer | Yuya Kusakabe <yuya.kusakabe@gmail.com> | 2017-01-12 11:42:40 +0900 |
commit | 83ddb9a56782a0fa97236289ab9db0e36699bc84 (patch) | |
tree | dcc24ef4cd55039f4e638b1a0bbed9e7bc57467a /spec/one_node/Vagrantfile | |
parent | 79060076f217eebf8f8e5f829bd035b47adef06a (diff) | |
download | vyos-integration-test-83ddb9a56782a0fa97236289ab9db0e36699bc84.tar.gz vyos-integration-test-83ddb9a56782a0fa97236289ab9db0e36699bc84.zip |
Refactor
Diffstat (limited to 'spec/one_node/Vagrantfile')
-rw-r--r-- | spec/one_node/Vagrantfile | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/spec/one_node/Vagrantfile b/spec/one_node/Vagrantfile index 03b9ff7..bfa380c 100644 --- a/spec/one_node/Vagrantfile +++ b/spec/one_node/Vagrantfile @@ -1,28 +1,28 @@ require 'yaml' -configs = YAML.load_file("config.yaml") +configs = YAML.load_file('config.yaml') -Vagrant.configure("2") do |config| +Vagrant.configure('2') do |config| config.vm.provider :libvirt do |libvirt| libvirt.cpu_mode = 'host-passthrough' end configs.keys.each do |host| config.vm.define host.to_sym do |c| - c.vm.box = "higebu/vyos" - c.vm.synced_folder "./", "/vagrant", - :owner => "vagrant", - :group => "vyattacfg", - :mount_options => ["dmode=775,fmode=775"] + c.vm.box = 'higebu/vyos' + c.vm.synced_folder './', '/vagrant', + owner: 'vagrant', + group: 'vyattacfg', + mount_options: ['dmode=775,fmode=775'] c.vm.hostname = host - if !configs[host].nil? and configs[host].has_key? :networks + if !configs[host].nil? && configs[host].key?(:networks) configs[host][:networks].keys.each do |net| c.vm.network :private_network, - :ip => configs[host][:networks][net], - :libvirt__network_name => net, - :libvirt__dhcp_enabled => false + ip: configs[host][:networks][net], + libvirt__network_name: net, + libvirt__dhcp_enabled: false end end - c.vm.provision "shell", path: "#{host}_script.sh" + c.vm.provision 'shell', path: "#{host}_script.sh" end end end |