2 # vi: set ft=ruby sw=2 ts=2 sts=2 et :
4 # Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
5 VAGRANTFILE_API_VERSION = "2"
7 Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
8 # root off of the rackspace provider dummy box
9 config.vm.box = "dummy"
11 # rackspace systems even with cloud-init
12 # don't seem to have the cloud init user ${osname}
13 # getting the ssh key for some reason, root does
15 config.ssh.username = 'root'
17 # Fedora and EL systems default to requiring a tty for sudo
18 if (ENV['RSPTY'] == 'default')
19 config.ssh.pty = false
24 # The rackspace provider by default tries to rsync
25 # the local folder / vagrant box to /vagrant
26 # unfortunately, even with config.ssh.pty = true
27 # this fails because it doesn't recognize the pty requirement
28 # when doing the sudo based rsync (not that it needs to sudo
29 # when doing things as root). To avoid this, disable the
30 # default sync, we don't need it anyway.
31 config.vm.synced_folder '.', '/vagrant', :disabled => true
33 # make sure to set the following in your
34 # ~/.vagrant.d/boxes/dummy/0/rackspace/Vagrantfile
39 # If you are not using a SSH token / smartcard also set this
41 # config.ssh.private_key_path -- set this outside the rackspace block
43 config.vm.provider :rackspace do |rs|
44 # create these base builds always on the smallest system possible
45 rs.flavor = 'general1-1'
47 # allow for switching to ORD cloud but default to DFW
48 if (ENV['RSREGION'] == 'ord')
49 rs.rackspace_region = :ord
51 rs.rackspace_region = :dfw
54 # Default to the Fedora 20 image unless overridden by a RSIMAGE
55 # environment variable
57 rs.image = ENV['RSIMAGE']
59 rs.image = 'Fedora 20 (Heisenbug) (PVHVM)'
63 # Do a full system update and force enforcing on (it's in permissive
64 # by default in the rackspace base images)
65 config.vm.provision 'shell', path: 'bootstrap.sh'
67 # disable the default requiretty for sudo that Fedora and CentOS have
68 config.vm.provision 'shell', path: 'remove_requiretty.sh'
70 # Execute a system clean-up in prep for imaging so that this base
71 # image can be used for other Rackspace Vagrant configurations
72 config.vm.provision 'shell', path: 'system_reseal.sh'