generator_files/Vagrantfile.erb in berkshelf-3.0.0.beta2 vs generator_files/Vagrantfile.erb in berkshelf-3.0.0.beta3
- old
+ new
@@ -6,10 +6,21 @@
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.
config.vm.hostname = "<%= "#{cookbook_name.gsub('_','-')}-berkshelf" %>"
+ # Set the version of chef to install using the vagrant-omnibus plugin
+<% if berkshelf_config.vagrant.omnibus.enabled -%>
+<% if berkshelf_config.vagrant.omnibus.version == "latest" -%>
+ config.omnibus.chef_version = :latest
+<% else %>
+ config.omnibus.chef_version = "<%= berkshelf_config.vagrant.omnibus.version %>"
+<% end -%>
+<% else %>
+ #config.omnibus.chef_version = :latest
+<% end -%>
+
# Every Vagrant virtual environment requires a box to build off of.
config.vm.box = "<%= berkshelf_config.vagrant.vm.box %>"
# The url from where the 'config.vm.box' box will be fetched if it
# doesn't already exist on the user's system.
@@ -94,13 +105,13 @@
]
end
<% elsif berkshelf_config.vagrant.vm.provision == "chef_solo" -%>
config.vm.provision :chef_solo do |chef|
chef.json = {
- :mysql => {
- :server_root_password => 'rootpass',
- :server_debian_password => 'debpass',
- :server_repl_password => 'replpass'
+ mysql: {
+ server_root_password: 'rootpass',
+ server_debian_password: 'debpass',
+ server_repl_password: 'replpass'
}
}
chef.run_list = [
<% if options[:chef_minitest] -%>