Skip to content

Instantly share code, notes, and snippets.

@jtimberman
Created March 20, 2012 05:46

Revisions

  1. Joshua Timberman created this gist Mar 20, 2012.
    14 changes: 14 additions & 0 deletions Vagrantfile.rb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,14 @@
    require 'chef'
    require 'chef/config'
    require 'chef/knife'

    current_dir = File.dirname(__FILE__)
    Chef::Config.from_file(File.join(current_dir, '.chef', 'knife.rb'))

    Vagrant::Config.run do |config|
    config.vm.provision :chef_client do |chef|
    chef.chef_server_url = Chef::Config[:chef_server_url]
    chef.validation_key_path = "#{current_dir}/.chef/#{Chef::Config[:validation_client_name]}.pem"
    chef.validation_client_name = Chef::Config[:validation_client_name]
    end
    end