How to run a chef recipe after vagrant box provisioned -
i'm using vagrant + berkshelf + chef solo mirror behavior of production aws opsworks boxes on development machine.
i can vagrant box fine, now, after has been provisioned, want able run different chef recipe cookbooks used during provisioning. want because i'm trying emulate opsworks' behavior: let me run deploy
recipe push of button. want able either use vagrant or chef-solo inside vagrant box run same recipe.
i think can solve adding recipe provisioning process builds different solo.rb
config files different on-demand recipes want run. these config files point vagrant/berkshelf cookbooks_path
(which /tmp/vagrant-chef-1/
me) , set run list appropriate recipe. these config files used chef-solo.
i feeling has solved problem before in more elegant way. there better way this?
if not, know way within vagrant or within recipe find cookbook path don't have hardcode /tmp/vagrant-chef-1/
solo.rb
config files?
you can add multiple provisioners. after first config.vm.provision :chef_solo
block add 1 applying recipe want run after first deployment.
Comments
Post a Comment