lib/config_builder/model/vm.rb in vagrant-config_builder-0.13.0 vs lib/config_builder/model/vm.rb in vagrant-config_builder-0.14.0

- old
+ new

@@ -153,22 +153,29 @@ # @!attribute [rw] communicator # @return [String] The name of the communicator to use when sending # commands to this box. Set to 'winrm' for Windows VMs. def_model_attribute :communicator + # @!attribute [rw] autostart + # @return [Boolean] If true, vagrant will start the box on "vagrant up". + # If false, vagrant must be given the box name explicitly or it will not + # start. + def_model_attribute :autostart + def initialize @defaults = { :providers => [], :provisioners => [], :forwarded_ports => [], :private_networks => [], :synced_folders => [], + :autostart => true, } end def to_proc Proc.new do |global_config| - global_config.vm.define(attr(:name)) do |config| + global_config.vm.define(attr(:name), autostart: attr(:autostart)) do |config| vm_config = config.vm with_attr(:box) { |val| vm_config.box = val } with_attr(:box_url) { |val| vm_config.box_url = val } with_attr(:box_download_checksum) { |val| vm_config.box_download_checksum = val }