@@ -4,6 +4,7 @@ require 'yaml'
44
55PLAYBOOK = 'test.yml'
66CONFIGURATION_FILE = 'boxes.yml'
7+ ROLE_NAME = "#{ File . expand_path ( ".." ) . split ( "/" ) [ -1 ] } "
78
89Vagrant . configure ( '2' ) do |config |
910
@@ -24,15 +25,16 @@ Vagrant.configure('2') do |config|
2425 config . vm . define box_name do |host |
2526
2627 host . vm . box = box_settings [ 'box' ] unless not box_settings . key? 'box'
28+ host . vm . box_version = box_settings [ 'box_version' ] unless not box_settings . key? 'box_version'
2729
2830 host . vm . network box_settings [ 'network' ] [ 'name' ] , ip : box_settings [ 'network' ] [ 'ip' ] unless box_settings . key? 'network'
29- host . vm . network :forwarded_port , guest : 3000 , host : 3000
3031 host . vm . synced_folder '.' , '/vagrant' , disabled : true
3132
3233 # puts "[DEBUG] applying virtualbox settings for #{box_name} box..."
3334 customize_args = [ "modifyvm" , :id ]
34- box_settings [ 'provider' ] [ 'virtualbox' ] . collect { |k , v | customize_args |= [ "--#{ k } " , v . to_s ] }
35+ vagrant_environment [ 'provider' ] [ 'virtualbox' ] . collect { |k , v | customize_args |= [ "--#{ k } " , v . to_s ] }
3536 host . vm . provider 'virtualbox' do |vb |
37+ vb . name = "#{ ROLE_NAME } _#{ box_name } "
3638 vb . customize customize_args
3739 end
3840
@@ -47,7 +49,19 @@ Vagrant.configure('2') do |config|
4749 'yakkety64.vagrant.dev' => {
4850 'ansible_python_interpreter' => '/usr/bin/python2.7' ,
4951 'playbook_python2' => true
50- }
52+ } ,
53+ 'artful64.vagrant.dev' => {
54+ 'ansible_python_interpreter' => '/usr/bin/python2.7' ,
55+ 'playbook_python2' => true
56+ } ,
57+ 'bionic64.vagrant.dev' => {
58+ 'ansible_python_interpreter' => '/usr/bin/python2.7' ,
59+ 'playbook_python2' => true
60+ } ,
61+ 'cosmic64.vagrant.dev' => {
62+ 'ansible_python_interpreter' => '/usr/bin/python2.7' ,
63+ 'playbook_python2' => true
64+ } ,
5165 }
5266
5367 ansible . playbook = PLAYBOOK
0 commit comments