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
20 # The rackspace provider by default tries to rsync
21 # the local folder / vagrant box to /vagrant
22 # unfortunately, even with config.ssh.pty = true
23 # this fails because it doesn't recognize the pty requirement
24 # when doing the sudo based rsync (not that it needs to sudo
25 # when doing things as root). To avoid this, disable the
26 # default sync, we don't need it anyway.
27 config.vm.synced_folder '.', '/vagrant', :disabled => true
29 # make sure to set the following in your
30 # ~/.vagrant.d/boxes/dummy/0/rackspace/Vagrantfile
35 # If you are not using a SSH token / smartcard also set this
37 # config.ssh.private_key_path -- set this outside the rackspace block
39 config.vm.provider :rackspace do |rs|
40 # create these base builds always on the smallest system possible
41 rs.flavor = 'general1-1'
43 # allow for switching to ORD cloud but default to DFW
44 if (ENV['RSREGION'] == 'ord')
45 rs.rackspace_region = :ord
47 rs.rackspace_region = :dfw
50 # Default to the Fedora 20 image unless overridden by a RSIMAGE
51 # environment variable
53 rs.image = ENV['RSIMAGE']
55 rs.image = 'Fedora 20 (Heisenbug) (PVHVM)'
59 # Do a full system update and force enforcing on (it's in permissive
60 # by default in the rackspace base images)
61 config.vm.provision 'shell', path: 'bootstrap.sh'
63 # disable the default requiretty for sudo that Fedora and CentOS have
64 config.vm.provision 'shell', path: 'remove_requiretty.sh'
66 # Execute a system clean-up in prep for imaging so that this base
67 # image can be used for other Rackspace Vagrant configurations
68 config.vm.provision 'shell', path: 'system_reseal.sh'