Add pidentd to dispense manifest
[uccvend-vagrant.git] / Vagrantfile
1 # -*- mode: ruby -*-
2 # vi: set ft=ruby :
3
4 # Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
5 VAGRANTFILE_API_VERSION = "2"
6
7 Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
8   # All Vagrant configuration is done here. The most common configuration
9   # options are documented and commented below. For a complete reference,
10   # please see the online documentation at vagrantup.com.
11
12   # Every Vagrant virtual environment requires a box to build off of.
13   config.vm.box = "ubuntu/trusty32"
14
15   # The url from where the 'config.vm.box' box will be fetched if it
16   # doesn't already exist on the user's system.
17   # config.vm.box_url = "http://domain.com/path/to/above.box"
18
19   # Create a forwarded port mapping which allows access to a specific port
20   # within the machine from a port on the host machine. In the example below,
21   # accessing "localhost:8080" will access port 80 on the guest machine.
22   # config.vm.network :forwarded_port, guest: 80, host: 8080
23
24   # Create a private network, which allows host-only access to the machine
25   # using a specific IP.
26   # config.vm.network :private_network, ip: "192.168.33.10"
27
28   # Create a public network, which generally matched to bridged network.
29   # Bridged networks make the machine appear as another physical device on
30   # your network.
31   # config.vm.network :public_network
32
33   # If true, then any SSH connections made will enable agent forwarding.
34   # Default value: false
35   # config.ssh.forward_agent = true
36
37   # Share an additional folder to the guest VM. The first argument is
38   # the path on the host to the actual folder. The second argument is
39   # the path on the guest to mount the folder. And the optional third
40   # argument is a set of non-required options.
41   # config.vm.synced_folder "../data", "/vagrant_data"
42
43   # Provider-specific configuration so you can fine-tune various
44   # backing providers for Vagrant. These expose provider-specific options.
45   # Example for VirtualBox:
46   #
47   config.vm.provider :virtualbox do |vb|
48     # boot headless
49     vb.gui = false
50   
51   #  # Use VBoxManage to customize the VM. For example to change memory:
52   #  vb.customize ["modifyvm", :id, "--memory", "1024"]
53   end
54   #
55   # View the documentation for the provider you're using for more
56   # information on available options.
57
58   # Enable provisioning with Puppet stand alone.  Puppet manifests
59   # are contained in a directory path relative to this Vagrantfile.
60   # You will need to create the manifests directory and a manifest in
61   # the file ubuntu/trusty32.pp in the manifests_path directory.
62   #
63   # An example Puppet manifest to provision the message of the day:
64   #
65   # # group { "puppet":
66   # #   ensure => "present",
67   # # }
68   # #
69   # # File { owner => 0, group => 0, mode => 0644 }
70   # #
71   # # file { '/etc/motd':
72   # #   content => "Welcome to your Vagrant-built virtual machine!
73   # #               Managed by Puppet.\n"
74   # # }
75   #
76
77   # Install relevant puppet modules
78
79   config.vm.provision :shell, :run => "always" do |shell|
80     shell.inline = %{
81       mkdir -p /etc/puppet/modules;
82       function install_module {
83         folder=`echo $1 | sed s/.*-//`
84         if [ ! -d /etc/puppet/modules/$folder ]; then
85           puppet module install $1
86         fi
87       }
88       install_module puppetlabs-vcsrepo
89 #     install_module stdlib
90 #      install_module apt
91 #      install_module ruby
92     }
93   end
94
95
96   # Now run puppet
97
98   config.vm.provision :puppet do |puppet|
99     #puppet.facter = {
100     #   "kiosk_url" => "http://map.ipviking.com/",
101     #}
102
103     puppet.manifests_path = "puppet/manifests"
104
105     puppet.module_path = "puppet/modules"
106     puppet.manifest_file  = "init.pp"
107     puppet.options = "--verbose --debug"
108   end
109
110 end

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