ansible-mysql/Vagrantfile

47 lines
1.9 KiB
Plaintext
Raw Normal View History

2015-07-12 17:15:59 +07:00
# -*- mode: ruby -*-
# vi: set ft=ruby :
# vi: set tabstop=2 :
# vi: set shiftwidth=2 :
Vagrant.configure("2") do |config|
vms = [
2016-09-23 15:01:02 +07:00
["jessie-default-mysql-master", "debian/jessie64", "192.168.200.10", ["jessie","default","mysql","master"]],
["jessie-default-mysql-slave", "debian/jessie64", "192.168.200.11", ["jessie","default","mysql","slave"]],
["jessie-upstream-mariadb-master", "debian/jessie64", "192.168.200.12", ["jessie","upstream","mariadb","master"]],
["jessie-upstream-mariadb-slave", "debian/jessie64", "192.168.200.13", ["jessie","upstream","mariadb","slave"]],
["jessie-upstream-percona-master", "debian/jessie64", "192.168.200.14", ["jessie","upstream","percona","master"]],
["jessie-upstream-percona-slave", "debian/jessie64", "192.168.200.15", ["jessie","upstream","percona","slave"]],
["jessie-default-mariadb-master", "debian/jessie64", "192.168.200.16", ["jessie","default","mariadb","master"]],
["jessie-default-mariadb-slave", "debian/jessie64", "192.168.200.17", ["jessie","default","mariadb","slave"]],
2016-09-23 15:18:28 +07:00
["jessie-upstream-mariadbgalera-1", "debian/jessie64", "192.168.200.18", ["jessie","upstream","mariadbgalera","1"]],
["jessie-upstream-mariadbgalera-2", "debian/jessie64", "192.168.200.19", ["jessie","upstream","mariadbgalera","2"]],
["jessie-upstream-mariadbgalera-3", "debian/jessie64", "192.168.200.20", ["jessie","upstream","mariadbgalera","3"]]
]
2015-07-12 17:15:59 +07:00
config.vm.provider "virtualbox" do |v|
v.cpus = 1
v.memory = 256
end
2015-07-12 17:15:59 +07:00
vms.each do |vm|
config.vm.define vm[0] do |m|
2016-02-15 15:06:05 +07:00
m.vm.hostname = vm[0]
m.vm.box = vm[1]
m.vm.network "private_network", ip: vm[2]
2015-07-12 17:15:59 +07:00
m.vm.provision "ansible" do |ansible|
ansible.playbook = "tests/test.yml"
ansible.groups = {
vm[3][0] => vm[0],
vm[3][1] => vm[0],
vm[3][2] => vm[0],
vm[3][3] => vm[0],
}
ansible.verbose = 'vv'
ansible.sudo = true
end
end
end
2015-07-12 17:15:59 +07:00
end