Move vagrant lxc puppet installation shell provisioning code out to a file

This commit is contained in:
Fabio Rehm 2013-03-09 16:40:42 -03:00
parent 08218e209a
commit fd93fed254
2 changed files with 14 additions and 5 deletions

View file

@ -30,11 +30,7 @@ Vagrant.configure("2") do |config|
lxc.start_opts << 'lxc.aa_profile=unconfined'
end
config.vm.provision :shell, inline: '
if ! `which puppet > /dev/null`; then
sudo apt-get update &&
sudo apt-get install puppet -y
fi'
config.vm.provision :shell, :path => 'shell-provisioning/install-puppet'
config.vm.provision :puppet do |puppet|
puppet.manifests_path = "."

View file

@ -0,0 +1,13 @@
#!/bin/bash
set -e
if `which puppet > /dev/null`; then
exit 0
fi
echo 'An old kernel was found on the guest machine and it will be upgraded' 1>&2
echo 'Please reload the box after provisioning when finished' 1>&2
sudo apt-get update
sudo apt-get install puppet -y