# -*- mode: ruby -*-
# vi: set ft=ruby :

# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  config.vm.box = "clusterhq/fedora20-updated"
  # Configure base system
  config.vm.provision :shell, :path => "bootstrap.py", :privileged => true,
      :args => [
          ENV.fetch('FLOCKER_RPM_VERSION', ''),
          ENV.fetch('FLOCKER_BRANCH', ''),
          ENV.fetch('FLOCKER_BUILD_SERVER', '')
      ]
  # Prepare caches
  config.vm.provision :shell, :path => "cache.sh", :privileged => true
  # Cleanup
  config.vm.provision :shell, :path => "../cleanup.sh", :privileged => true

  if Vagrant.has_plugin?("vagrant-cachier")
    config.cache.scope = :box
  end
end
