Better interactions with Vagrant
parent
65795bbe2c
commit
2253102c4d
|
@ -6,8 +6,13 @@
|
|||
Vagrant.configure("2") do |config|
|
||||
|
||||
vms = [
|
||||
[ "debian-wheezy", "deb/wheezy-amd64" , "192.168.33.29" ],
|
||||
[ "debian-jessie", "deb/jessie-amd64", "192.168.33.30" ]
|
||||
[ "wheezy-debian-mysql", "deb/wheezy-amd64" , "192.168.33.40" ],
|
||||
[ "wheezy-upstream-mariadb", "deb/wheezy-amd64" , "192.168.33.42" ],
|
||||
[ "wheezy-upstream-percona", "deb/wheezy-amd64" , "192.168.33.43" ],
|
||||
[ "jessie-debian-mysql", "deb/jessie-amd64", "192.168.33.50" ],
|
||||
[ "jessie-debian-mariadb", "deb/jessie-amd64", "192.168.33.51" ],
|
||||
[ "jessie-upstream-mariadb", "deb/jessie-amd64", "192.168.33.52" ],
|
||||
[ "jessie-upstream-percona", "deb/jessie-amd64", "192.168.33.53" ]
|
||||
]
|
||||
|
||||
config.vm.provider "virtualbox" do |v|
|
||||
|
@ -22,9 +27,14 @@ Vagrant.configure("2") do |config|
|
|||
|
||||
m.vm.provision "ansible" do |ansible|
|
||||
ansible.playbook = "tests/test.yml"
|
||||
ansible.groups = { "test" => [ vm[0] ] }
|
||||
ansible.groups = {
|
||||
"debian_mysql" => ["wheezy-debian-mysql", "jessie-debian-mysql"],
|
||||
"upstream_mariadb" => ["wheezy-upstream-mariadb", "jessie-upstream-mariadb"],
|
||||
"upstream_percona" => ["wheezy-upstream-percona", "jessie-upstream-percona"],
|
||||
"debian_mariadb" => ["jessie-debian-mariadb"]
|
||||
}
|
||||
ansible.verbose = 'vv'
|
||||
ansible.sudo = true
|
||||
ansible.sudo = true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
|
||||
- name: FAIL | If config asked is impossible
|
||||
fail: msg=config asked is impossible
|
||||
fail: msg="config asked is impossible origin -> {{ mysql_origin }} vendor -> {{ mysql_vendor }}"
|
||||
when: >
|
||||
not (
|
||||
(mysql_origin == 'default' and mysql_vendor == 'mysql') or
|
||||
|
|
|
@ -1,5 +1,29 @@
|
|||
---
|
||||
|
||||
- hosts: all
|
||||
- hosts: upstream_mariadb
|
||||
vars:
|
||||
mysql_origin: 'upstream'
|
||||
mysql_vendor: 'mariadb'
|
||||
roles:
|
||||
- ../../
|
||||
- ../../
|
||||
|
||||
- hosts: debian_mariadb
|
||||
vars:
|
||||
mysql_origin: 'default'
|
||||
mysql_vendor: 'mariadb'
|
||||
roles:
|
||||
- ../../
|
||||
|
||||
- hosts: debian_mysql
|
||||
vars:
|
||||
mysql_origin: 'default'
|
||||
mysql_vendor: 'mysql'
|
||||
roles:
|
||||
- ../../
|
||||
|
||||
- hosts: upstream_percona
|
||||
vars:
|
||||
mysql_origin: 'upstream'
|
||||
mysql_vendor: 'percona'
|
||||
roles:
|
||||
- ../../
|
||||
|
|
Loading…
Reference in New Issue