Skip to content

Instantly share code, notes, and snippets.

Created September 19, 2013 23:40
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Vagrantfile loading config from knife.rb, great for knife-block testing
require 'chef'
Chef::Config.from_file(File.join(ENV['HOME'], '.chef', 'knife.rb'))
Vagrant.configure("2") do |config|
config.omnibus.chef_version = "11.6.0" = "centos64"
config.vm.provision :chef_client do |chef|
chef.chef_server_url = Chef::Config[:chef_server_url]
chef.validation_key_path = Chef::Config[:validation_key]
chef.validation_client_name = Chef::Config[:validation_client_name]
chef.node_name = 'testnode'
chef.encrypted_data_bag_secret_key_path = "../../bootstrap/"
chef.log_level = Chef::Config[:log_level]
chef.environment = "dev"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment