2015-07-23 21:35:25 +07:00
|
|
|
# -*- mode: ruby -*-
|
|
|
|
# vi: set ft=ruby :
|
|
|
|
# vi: set tabstop=2 :
|
|
|
|
# vi: set shiftwidth=2 :
|
|
|
|
|
|
|
|
Vagrant.configure("2") do |config|
|
|
|
|
|
2017-06-06 21:27:11 +07:00
|
|
|
vms_debian = [
|
2017-06-13 16:51:51 +07:00
|
|
|
{ :name => "debian-jessie-php56", :box => "debian/jessie64", :vars => { }},
|
2017-06-06 21:27:11 +07:00
|
|
|
{ :name => "debian-jessie-php70", :box => "debian/jessie64", :vars => { "php_version": '7.0' }},
|
|
|
|
{ :name => "debian-jessie-php71", :box => "debian/jessie64", :vars => { "php_version": '7.1' }},
|
2017-06-13 16:51:51 +07:00
|
|
|
{ :name => "debian-stretch-php70", :box => "debian/stretch64", :vars => { }},
|
2017-06-06 21:27:11 +07:00
|
|
|
{ :name => "debian-stretch-php71", :box => "debian/stretch64", :vars => { "php_version": '7.1' }}
|
2015-07-23 21:35:25 +07:00
|
|
|
]
|
|
|
|
|
2017-06-06 21:27:11 +07:00
|
|
|
conts = [
|
2017-06-13 16:51:51 +07:00
|
|
|
{ :name => "docker-debian-jessie-php56", :docker => "hanxhx/vagrant-ansible:debian8", :vars => { }},
|
2017-06-06 21:27:11 +07:00
|
|
|
{ :name => "docker-debian-jessie-php70", :docker => "hanxhx/vagrant-ansible:debian8", :vars => { "php_version": '7.0' }},
|
|
|
|
{ :name => "docker-debian-jessie-php71", :docker => "hanxhx/vagrant-ansible:debian8", :vars => { "php_version": '7.1' }},
|
2017-06-13 16:51:51 +07:00
|
|
|
{ :name => "docker-debian-stretch-php70", :docker => "hanxhx/vagrant-ansible:debian9", :vars => { }},
|
2017-06-06 21:27:11 +07:00
|
|
|
{ :name => "docker-debian-stretch-php71", :docker => "hanxhx/vagrant-ansible:debian9", :vars => { "php_version": '7.1' }}
|
|
|
|
]
|
2015-07-23 21:35:25 +07:00
|
|
|
|
2017-06-06 21:27:11 +07:00
|
|
|
config.vm.network "private_network", type: "dhcp"
|
2015-07-23 21:35:25 +07:00
|
|
|
|
2017-06-06 21:27:11 +07:00
|
|
|
conts.each do |opts|
|
|
|
|
config.vm.define opts[:name] do |m|
|
|
|
|
m.vm.provider "docker" do |d|
|
|
|
|
d.image = opts[:docker]
|
|
|
|
d.remains_running = true
|
|
|
|
d.has_ssh = true
|
|
|
|
end
|
2015-07-23 21:35:25 +07:00
|
|
|
m.vm.provision "ansible" do |ansible|
|
|
|
|
ansible.playbook = "tests/test.yml"
|
|
|
|
ansible.verbose = 'vv'
|
2016-03-04 13:12:41 +07:00
|
|
|
ansible.sudo = true
|
2017-06-06 21:27:11 +07:00
|
|
|
ansible.extra_vars = opts[:vars]
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
vms_debian.each do |opts|
|
|
|
|
config.vm.define opts[:name] do |m|
|
|
|
|
m.vm.box = opts[:box]
|
|
|
|
m.vm.provider "virtualbox" do |v|
|
|
|
|
v.cpus = 1
|
|
|
|
v.memory = 256
|
2015-07-23 21:35:25 +07:00
|
|
|
end
|
2017-06-06 21:27:11 +07:00
|
|
|
m.vm.provision "ansible" do |ansible|
|
|
|
|
ansible.playbook = "tests/test.yml"
|
|
|
|
ansible.verbose = 'vv'
|
|
|
|
ansible.sudo = true
|
|
|
|
ansible.extra_vars = opts[:vars]
|
|
|
|
end
|
2015-07-23 21:35:25 +07:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|