Move vagrant lxc puppet installation shell provisioning code out to a file
This commit is contained in:
parent
08218e209a
commit
fd93fed254
2 changed files with 14 additions and 5 deletions
|
@ -30,11 +30,7 @@ Vagrant.configure("2") do |config|
|
||||||
lxc.start_opts << 'lxc.aa_profile=unconfined'
|
lxc.start_opts << 'lxc.aa_profile=unconfined'
|
||||||
end
|
end
|
||||||
|
|
||||||
config.vm.provision :shell, inline: '
|
config.vm.provision :shell, :path => 'shell-provisioning/install-puppet'
|
||||||
if ! `which puppet > /dev/null`; then
|
|
||||||
sudo apt-get update &&
|
|
||||||
sudo apt-get install puppet -y
|
|
||||||
fi'
|
|
||||||
|
|
||||||
config.vm.provision :puppet do |puppet|
|
config.vm.provision :puppet do |puppet|
|
||||||
puppet.manifests_path = "."
|
puppet.manifests_path = "."
|
||||||
|
|
13
development/shell-provisioning/install-puppet
Executable file
13
development/shell-provisioning/install-puppet
Executable 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
|
Loading…
Add table
Reference in a new issue