I\'m using puppet to provision a vagrant (ubuntu based) virtual machine. In my script I need to:
sudo apt-get build-dep python-lxml
I know
@brain_bacon's strategy worked almost perfectly for me, with one small caveat - if the module already exists, then the provisioning script fails, halting the provisioning process. The following adjustment fixed this:
config.vm.provision :shell, :run => "always" do |shell|
shell.inline = %{
mkdir -p /etc/puppet/modules;
function install_module {
folder=`echo $1 | sed s/.*-//`
if [ ! -d /etc/puppet/modules/$folder ]; then
puppet module install $1
fi
}
install_module stdlib
install_module apt
install_module ruby
}
end