vagrant: we can test on jessie/stretch in parallel

Only for Stretch :
$ vagrant up stretch

Only for Jessie :
$ vagrant up jessie

Both at the same time :
$ vagrant up
This commit is contained in:
Jérémy Lecour 2017-10-09 09:17:52 +02:00 committed by Jérémy Lecour
parent 58a815ef6b
commit 72569328d7
2 changed files with 28 additions and 11 deletions

33
test/Vagrantfile vendored
View File

@ -4,9 +4,6 @@
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# config.vm.box = "debian/jessie64"
config.vm.box = "debian/stretch64"
config.vm.synced_folder "./vagrant_share/", "/vagrant", disabled: true
config.vm.provider :virtualbox do |v|
@ -16,12 +13,32 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
v.customize ["modifyvm", :id, "--ioapic", "on"]
end
# Master
config.vm.define :default do |default|
default.vm.hostname = "default"
# Stretch
config.vm.define :stretch do |node|
node.vm.hostname = "stretch"
node.vm.box = "debian/stretch64"
# default.vm.network :private_network, ip: "192.168.33.33"
default.vm.provision :ansible, run: "always" do |ansible|
ansible.limit = "default"
node.vm.provision :ansible, run: "always" do |ansible|
ansible.limit = "stretch"
ansible.playbook = "vagrant.yml"
# ansible.tags = "mysql"
ansible.raw_arguments = [
"-b",
"--ask-vault-pass",
"--diff",
# "--syntax",
# "-vvv",
]
end
end
# Jessie
config.vm.define :jessie do |node|
node.vm.hostname = "jessie"
node.vm.box = "debian/jessie64"
# default.vm.network :private_network, ip: "192.168.33.33"
node.vm.provision :ansible, run: "always" do |ansible|
ansible.limit = "jessie"
ansible.playbook = "vagrant.yml"
# ansible.tags = "mysql"
ansible.raw_arguments = [

View File

@ -1,10 +1,10 @@
---
- hosts: default
- hosts: all
gather_facts: yes
become: yes
vars_files:
- '~/code/evolix/evolix-private/vars/evolinux-secrets.yml'
- '~/GIT/evolix-private/vars/evolinux-secrets.yml'
vars:
evolinux_apt_upgrade: False
@ -25,4 +25,4 @@
roles:
- evolinux-base
- packweb-apache
- ~/code/evolix/evolix-private/roles/generateldif
- ~/GIT/evolix-private/roles/generateldif