Skip to content

Instantly share code, notes, and snippets.

@roblayton
Last active August 29, 2015 14:22
Show Gist options
  • Save roblayton/3d875e5cfee03b3741f1 to your computer and use it in GitHub Desktop.
Save roblayton/3d875e5cfee03b3741f1 to your computer and use it in GitHub Desktop.
A Vagrantfile to spin up 2 mysql instances for a master-master configuration
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.provision "shell", inline: "apt-get update"
config.vm.define "mysql1" do |mysql1|
mysql1.vm.hostname = "mysql1"
mysql1.vm.network "private_network", ip: "192.168.50.11"
mysql1.vm.provision "ansible" do |ansible|
ansible.playbook = "playbook.yml"
ansible.verbose = "vv"
ansible.sudo = true
end
end
config.vm.define "mysql2" do |mysql2|
mysql2.vm.hostname = "mysql2"
mysql2.vm.network "private_network", ip: "192.168.50.12"
mysql2.vm.provision "ansible" do |ansible|
ansible.playbook = "playbook.yml"
ansible.verbose = "vv"
ansible.sudo = true
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment