|
| 1 | +# -*- mode: ruby -*- |
| 2 | +# vi: set ft=ruby : |
| 3 | + |
| 4 | +Vagrant.configure("2") do |config| |
| 5 | + config.ssh.forward_agent = true |
| 6 | + config.vm.synced_folder Dir.getwd, "/home/vagrant/roles/ansible-python", nfs: true |
| 7 | + |
| 8 | + # ubuntu 12.04 that Travis CI is using |
| 9 | + config.vm.define 'travis', primary: true do |c| |
| 10 | + c.vm.network "private_network", ip: "192.168.100.2" |
| 11 | + c.vm.box = "precise-server-cloudimg-amd64-vagrant-disk1" |
| 12 | + c.vm.box_url = "https://cloud-images.ubuntu.com/vagrant/precise/current/precise-server-cloudimg-amd64-vagrant-disk1.box" |
| 13 | + c.vm.provision "shell" do |s| |
| 14 | + s.inline = "apt-get update -y; apt-get install python-software-properties; add-apt-repository ppa:rquillo/ansible; apt-get update -y; apt-get install ansible -y" |
| 15 | + s.privileged = true |
| 16 | + end |
| 17 | + end |
| 18 | + |
| 19 | + # ubuntu 14.04 Trusty |
| 20 | + config.vm.define 'ubuntu', primary: true do |c| |
| 21 | + c.vm.network "private_network", ip: "192.168.100.3" |
| 22 | + c.vm.box = "trusty-server-cloudimg-amd64-vagrant-disk1" |
| 23 | + c.vm.box_url = "https://cloud-images.ubuntu.com/vagrant/trusty/current/trusty-server-cloudimg-amd64-vagrant-disk1.box" |
| 24 | + c.vm.provision "shell" do |s| |
| 25 | + s.inline = "apt-get update -y; apt-get install -y software-properties-common; apt-add-repository ppa:ansible/ansible; apt-get update -y; apt-get install -y ansible" |
| 26 | + s.privileged = true |
| 27 | + end |
| 28 | + end |
| 29 | + |
| 30 | + # centos 6: |
| 31 | + config.vm.define 'centos' do |c| |
| 32 | + c.vm.network "private_network", ip: "192.168.100.4" |
| 33 | + c.vm.box = "centos65-x86_64-20140116" |
| 34 | + c.vm.box_url = "https://github.com/2creatives/vagrant-centos/releases/download/v6.5.3/centos65-x86_64-20140116.box" |
| 35 | + c.vm.provision "shell" do |s| |
| 36 | + s.inline = "yum update gmp; yum install ansible -y" |
| 37 | + s.privileged = true |
| 38 | + end |
| 39 | + end |
| 40 | + |
| 41 | + # centos 7: |
| 42 | + config.vm.define 'centos7' do |c| |
| 43 | + c.vm.network "private_network", ip: "192.168.100.5" |
| 44 | + c.vm.box = "centos/7" |
| 45 | + c.vm.provision "shell" do |s| |
| 46 | + s.inline = "yum install -y epel-release; yum install -y ansible" |
| 47 | + s.privileged = true |
| 48 | + end |
| 49 | + end |
| 50 | + |
| 51 | +end |
0 commit comments