我使用Chef Server配置我的流浪盒,我的Vagrantfile看起来像这样
Vagrant.configure("2") do |config|
config.vm.box = 'CentOS-7.1-64'
config.vm.box_url = 'https://github.com/holms/vagrant-centos7-box/releases/download/7.1.1503.001/CentOS-7.1.1503-x86_64-netboot.box'
config.omnibus.chef_version = :latest
config.berkshelf.enabled = true
config.berkshelf.berksfile_path = './Berksfile'
config.vm.provision :chef_client do |chef|
chef.provisioning_path = "/etc/chef"
chef.chef_server_url = "https://api.opscode.com/organizations/myorg"
chef.validation_key_path = ".chef/myorg-validator.pem"
chef.validation_client_name = "myorg-validator"
chef.node_name = "vagrant_dev"
chef.add_role ENV['CHEF_ROLE']
chef.environment = ENV['CHEF_ENV']
end
end
每次配置我的盒子时,它都会将所有内容重新上传到服务器
==> default: Uploading cookbooks to https://api.opscode.com/organizations/myorg
这通常需要一段时间。如果它们已经存在,有没有办法不上传烹饪书?