I've just started playing out with the Chef + Vagrant combo and while using vagrant-librarian-chef under vagrant-lxc I've hit an issue that vagrant-berkshelf users have reported to me in the past related to cookbooks installation.
The problem is this line and I worked around it by adding the code below to my Vagrantfile
require 'librarian/action'
class Librarian::Action::Install < Librarian::Action::Base
def create_install_path
if install_path.exist?
FileUtils.rm_rf("#{install_path}/.", secure: true)
end
install_path.mkpath
end
end
The problem with the current approach of recreating the whole directory messes up with vagrant-lxc shared folders / bind mounts and the guest container is no longer able to see the updated cookbooks after vagrant-librarian-chef kicks in. Without that change I can only provision my containers once and I'm not able to run vagrant provision after the machine is up.
I've already submitted a PR for Berkshelf and I'm up for doing the same here if you guys are up for doing the change :)
/cc @jimmycuadra
I've just started playing out with the Chef + Vagrant combo and while using vagrant-librarian-chef under vagrant-lxc I've hit an issue that vagrant-berkshelf users have reported to me in the past related to cookbooks installation.
The problem is this line and I worked around it by adding the code below to my
VagrantfileThe problem with the current approach of recreating the whole directory messes up with vagrant-lxc shared folders / bind mounts and the guest container is no longer able to see the updated cookbooks after vagrant-librarian-chef kicks in. Without that change I can only provision my containers once and I'm not able to run
vagrant provisionafter the machine is up.I've already submitted a PR for Berkshelf and I'm up for doing the same here if you guys are up for doing the change :)
/cc @jimmycuadra