Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # directory structure
- ansible/
- group_vars/
- database.yml # content below
- host_vars/
- master.yml
- hosts # content below
- Vagrantfile # content below
- # hosts file
- master ansible_ssh_host=127.0.0.1 ansible_ssh_port=2200 ansible_ssh_user='vagrant' ansible_ssh_private_key_file='/Users/me/medstack/.vagrant/machines/master/virtualbox/private_key'
- [database]
- master
- # Vagrantfile
- # -*- mode: ruby -*-
- # vi: set ft=ruby :
- Vagrant.configure("2") do |config|
- # config.vm.box = "ubuntu/trusty64"
- config.vm.box = "centos/6"
- config.vm.define "master" do |master|
- config.vm.network "private_network", ip: "192.168.50.4"
- end
- config.vm.provision "ansible" do |ansible|
- ansible.groups = {
- "database" => ["master"]
- }
- ansible.playbook = "playbook.yml"
- ansible.inventory_path = "hosts"
- end
- end
- # database.yml and master.yml content
- ---
- mysql_replication_user:
- - name: "replication"
- password: "replication"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement