Add code to Vagrantfile to install puppet modules
authorMark Tearle <mark@tearle.com>
Sat, 29 Nov 2014 14:35:36 +0000 (22:35 +0800)
committerMark Tearle <mark@tearle.com>
Sat, 29 Nov 2014 14:35:36 +0000 (22:35 +0800)
Vagrantfile

index f45d3eb..ea2f26f 100644 (file)
@@ -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/",

UCC git Repository :: git.ucc.asn.au