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 openstack provider dummy box
9 config.vm.box = "dummy"
10 config.ssh.username = 'root'
12 # make sure to set the following in your
13 # ~/.vagrant.d/boxes/dummy/0/openstack/Vagrantfile
15 # os.openstack_auth_url
23 # If you are not using an SSH token / smartcard also set this
25 # config.ssh.private_key_path -- set this outside the openstack block
27 config.vm.provider :openstack do |os, override|
29 override.vm.box = ENV['BOX']
31 override.vm.box = 'dummy'
33 config.ssh.username = 'centos'
34 os.flavor = 'm1.small'
36 # require an IMAGE to be passed in
37 # IMAGE must be a human name and not an image ID!
39 os.image = ENV['IMAGE']
41 os.image = 'BAD IMAGE'
42 override.ssh.username = 'baduser'
47 override.ssh.username = 'ubuntu'
50 override.ssh.username = 'fedora'
52 # take care of the tty requirement by fedora for sudo
53 os.user_data = "#!/bin/bash
54 /bin/sed -i 's/ requiretty/ !requiretty/' /etc/sudoers;"
57 override.ssh.username = 'centos'
59 # take care of the tty requirement by centos for sudo
60 os.user_data = "#!/bin/bash
61 /bin/sed -i 's/ requiretty/ !requiretty/' /etc/sudoers;"
65 # Explicitlly set default shared folder and load lib folder
66 config.vm.synced_folder ".", "/vagrant"
67 config.vm.synced_folder "../lib/", "/vagrant/lib"
69 # Do a full system update and enable enforcing if needed
70 config.vm.provision 'shell', path: '../lib/baseline.sh'
72 # run our bootstrapping
73 config.vm.provision 'shell', path: 'bootstrap.sh'
79 # set RESEAL to... anything if you want to snap an image of this box
80 # not setting the environment variable will cause the system to come
81 # up fully and not be in a resealable state
83 config.vm.provision 'shell', path: '../lib/system_reseal.sh'