vagrant chef error

if you are using precise64 (Ubuntu 12.04 LTS) and chef solo, you might be getting some errors while trying to use apache2, php or other cookbooks. this error can be solved by updating apt, simply by including

execute "apt-get update"

in your recipe. running apt package will unfortunately not help you.
it seems like each recipe is running in its own separate environment.

another solution is to run just one recipe and inside it include other recipes and configuration:

include_recipe "apt"
include_recipe "apache2"
...

this is what i ended up using, as it allows me to separate chef configuration from vagrant.
originally i’ve tried to run chef role with multiple recipes via vagrant config, however this is not possible because of the behavior mentioned abode.

Tagged on: ,

Leave a Reply