Move default chef solo configuration to the chef solo provisioner
This commit is contained in:
parent
86ffbe5d32
commit
2763540b44
|
@ -16,14 +16,8 @@ Vagrant::Config.run do |config|
|
|||
config.vm.project_directory = "/vagrant"
|
||||
config.vm.forward_port("ssh", 22, 2222)
|
||||
config.vm.disk_image_format = 'VMDK'
|
||||
config.vm.provisioner = nil
|
||||
|
||||
config.package.name = 'vagrant'
|
||||
config.package.extension = '.box'
|
||||
|
||||
config.chef_solo.cookbooks_path = "cookbooks"
|
||||
config.chef_solo.provisioning_path = "/tmp/vagrant-chef"
|
||||
config.chef_solo.json = {
|
||||
:instance_role => "vagrant",
|
||||
:recipes => ["vagrant_main"]
|
||||
}
|
||||
end
|
||||
|
|
|
@ -8,6 +8,15 @@ module Vagrant
|
|||
attr_accessor :provisioning_path
|
||||
attr_accessor :json
|
||||
|
||||
def initialize
|
||||
@cookbooks_path = "cookbooks"
|
||||
@provisioning_path = "/tmp/vagrant-chef"
|
||||
@json = {
|
||||
:instance_role => "vagrant",
|
||||
:recipes => ["vagrant_main"]
|
||||
}
|
||||
end
|
||||
|
||||
def to_json
|
||||
# Overridden so that the 'json' key could be removed, since its just
|
||||
# merged into the config anyways
|
||||
|
|
Loading…
Reference in New Issue