Last active
December 26, 2015 11:19
-
-
Save krisleech/7143310 to your computer and use it in GitHub Desktop.
Share node config between chef-solo and Vagrant
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
vagrant_json = JSON.parse(Pathname(__FILE__).dirname.join('nodes', 'vagrant.json').read) | |
config.vm.provision :chef_solo do |chef| | |
chef.cookbooks_path = ["site-cookbooks", "cookbooks"] | |
chef.json.merge!(vagrant_json) | |
chef.add_recipe "default" | |
end |
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
{ | |
"deploy_user": "vagrant", | |
"deploy_home": "/home/vagrant" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment