Vagrantfile loading config from knife.rb, great for knife-block testing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | |
config.vm.box = "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/encrypted_data_bag_secret.dev" | |
chef.log_level = Chef::Config[:log_level] | |
chef.environment = "dev" | |
chef.add_role("role_for_test") | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment