Search code examples
chef-soloberkshelf

Ignore homebrew when using Chef Solo and Berkshelf


I am using Chef Solo to provision a Vagrant machine and Berkshelf to install the cookbooks. I am using a Linux host (Ubuntu).

I want to use the mysql cookbook; but when I add:

cookbook 'mysql'

Berkshelf installs homebrew as a transitive dependency. Chef-solo loads everything and it fails because I am in Linux.

Is there any way to ignore the homebrew package when installing or loading cookbooks?

Note: I have tried to use

group :ignore do
  cookbook 'homebrew'
end

But when I run berks install --without ignore it returns an error:

ERROR: berks install was called with arguments

Solution

  • Finally the problem was not the homebrew package; it was the error it throwed.

    Using vagrant-omnibus to update Chef to the latest version removed the error and allowed me to finish the installation correctly.