From: Mark Tearle Date: Sat, 29 Nov 2014 14:35:36 +0000 (+0800) Subject: Add code to Vagrantfile to install puppet modules X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=f8c2d46837cb2e340129b96517c68638d8166c7c;p=uccvend-vagrant.git Add code to Vagrantfile to install puppet modules --- diff --git a/Vagrantfile b/Vagrantfile index f45d3eb..ea2f26f 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -74,6 +74,27 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| # # } # + # Install relevant puppet modules + + 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 puppetlabs-vcsrepo +# install_module stdlib +# install_module apt +# install_module ruby + } + end + + + # Now run puppet + config.vm.provision :puppet do |puppet| #puppet.facter = { # "kiosk_url" => "http://map.ipviking.com/",