2016-03-11 03:18:06 +03:00
# vi: set ft=ruby :
2016-06-21 19:30:47 +03:00
# See `HACKING.md` for more information on this.
2016-03-11 03:18:06 +03:00
Vagrant . configure ( 2 ) do | config |
2016-05-09 19:43:11 +03:00
config . vm . box = " centos/atomic-host "
config . vm . hostname = " centosah-dev "
2016-06-14 23:27:14 +03:00
config . vm . define " vmcheck " do | vmcheck |
end
2016-06-04 17:48:06 +03:00
2016-06-22 18:51:45 +03:00
# It's just easier to have ssh set up as root from the start so that tests
# don't need to sudo, which can sometimes cause issues. If we need to test
# any unprivileged things, we can still just sudo back into the vagrant
# user.
config . ssh . username = 'root'
config . ssh . password = 'vagrant'
config . ssh . insert_key = 'true'
# turn off the default rsync in the vagrant box and replace by one that
# places it directly to root (and also skip sync'ing .git and any cached
# containers)
config . vm . synced_folder " . " , " /home/vagrant/sync " , disabled : true
config . vm . synced_folder " . " , " /root/sync " , type : " rsync " ,
2016-06-22 19:00:45 +03:00
rsync__exclude : [ " .git/ " , " vagrant/*.tar.gz " ]
2016-06-22 18:51:45 +03:00
2016-06-09 17:21:07 +03:00
config . vm . provider " libvirt " do | libvirt , override |
libvirt . cpus = 2
libvirt . memory = 2048
libvirt . driver = 'kvm'
end
2016-06-04 17:48:06 +03:00
config . vm . provision " ansible " do | ansible |
2016-06-21 19:30:04 +03:00
ansible . playbook = " vagrant/setup.yml "
2016-06-04 17:48:06 +03:00
ansible . host_key_checking = false
2016-06-22 18:51:45 +03:00
ansible . extra_vars = { ansible_ssh_user : 'root' }
2016-06-04 17:48:06 +03:00
ansible . raw_ssh_args = [ '-o ControlMaster=no' ]
2016-06-22 18:51:45 +03:00
# for debugging the ansible playbook
#ansible.raw_arguments = ['-v']
2016-06-04 17:48:06 +03:00
end
2016-03-11 03:18:06 +03:00
end