Advertisement
opexxx

dionae-vagrant

Jul 8th, 2014
346
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.97 KB | None | 0 0
  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 = "precise32"
  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://files.vagrantup.com/precise32.box"
  18.  
  19.   # Set the hostname.
  20.   # config.vm.hostname = "dionaea-vagrant"
  21.  
  22.   # Create a forwarded port mapping which allows access to a specific port
  23.   # within the machine from a port on the host machine. In the example below,
  24.   # accessing "localhost:8080" will access port 80 on the guest machine.
  25.   # config.vm.network :forwarded_port, guest: 80, host: 8080
  26.  
  27.   # Create a private network, which allows host-only access to the machine
  28.   # using a specific IP.
  29.   # config.vm.network :private_network, ip: "192.168.33.10"
  30.  
  31.   # Create a public network, which generally matched to bridged network.
  32.   # Bridged networks make the machine appear as another physical device on
  33.   # your network.
  34.   config.vm.network :public_network
  35.  
  36.   # If true, then any SSH connections made will enable agent forwarding.
  37.   # Default value: false
  38.   # config.ssh.forward_agent = true
  39.  
  40.   # Share an additional folder to the guest VM. The first argument is
  41.   # the path on the host to the actual folder. The second argument is
  42.   # the path on the guest to mount the folder. And the optional third
  43.   # argument is a set of non-required options.
  44.   # config.vm.synced_folder "../data", "/vagrant_data"
  45.  
  46.   # Provider-specific configuration so you can fine-tune various
  47.   # backing providers for Vagrant. These expose provider-specific options.
  48.   # Example for VirtualBox:
  49.   #
  50.   # config.vm.provider :virtualbox do |vb|
  51.   # # Don't boot with headless mode
  52.   # vb.gui = true
  53.   #
  54.   # # Use VBoxManage to customize the VM. For example to change memory:
  55.   # vb.customize ["modifyvm", :id, "--memory", "1024"]
  56.   # end
  57.   #
  58.   # View the documentation for the provider you're using for more
  59.   # information on available options.
  60.  
  61.   config.vm.provider :virtualbox do |vb|
  62.     vb.name = "dionaea-vagrant"
  63.   end
  64.  
  65.   # Enable provisioning
  66.   config.vm.provision "shell", inline: "cp /vagrant/*.sh /tmp/"
  67.   config.vm.provision "shell", inline: "aptitude -y install dos2unix && dos2unix /tmp/*.sh"
  68.   config.vm.provision "shell", inline: "cd /tmp/ && sh setupDionaea.sh && sh configureDionaea.sh && sh runDionaea.sh"
  69.   config.vm.provision "shell", inline: "cp /tmp/runDionaea.sh /home/vagrant/ && rm /tmp/*.sh"
  70.   config.vm.provision "shell", inline: "echo '@reboot vagrant /home/vagrant/runDionaea.sh' >> /etc/cron.d/dionaea"
  71. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement