Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save egroeper/a4c140a421c631c55e0e to your computer and use it in GitHub Desktop.
Save egroeper/a4c140a421c631c55e0e to your computer and use it in GitHub Desktop.
# 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|
# Every Vagrant virtual environment requires a box to build off of.
config.vm.box = "ubuntu/trusty64"
# The url from where the 'config.vm.box' box will be fetched if it
# doesn't already exist on the user's system.
config.vm.box_url = "https://cloud-images.ubuntu.com/vagrant/trusty/current/trusty-server-cloudimg-amd64-vagrant-disk1.box"
#enable agent forwarding (for rsync)
config.ssh.forward_agent = true
# insecure, but working settings
# we just run tests in a protected environment
config.ssh.insert_key = false
config.vm.define "loadbalancer" do |lb|
lb.vm.hostname = "loadbalancer"
lb.vm.network :private_network, ip: "192.168.23.11"
end
config.vm.define "db" do |db|
db.vm.hostname = "db"
db.vm.network :private_network, ip: "192.168.23.12"
end
config.vm.define "master" do |master|
master.vm.hostname = "master"
master.vm.network :private_network, ip: "192.168.23.13"
end
config.vm.define "bgnode" do |bgnode|
bgnode.vm.hostname = "bgnode"
bgnode.vm.network :private_network, ip: "192.168.23.14"
end
config.vm.define "memcached" do |memcached|
memcached.vm.hostname = "memcached"
memcached.vm.network :private_network, ip: "192.168.23.60"
end
config.vm.define "clone1" do |clone1|
clone1.vm.hostname = "clone1"
clone1.vm.network :private_network, ip: "192.168.23.15"
# run provisioning on last node
config.vm.provision "ansible" do |ansible|
ansible.limit = 'all'
ansible.inventory_path = "tests/hosts"
#ansible.verbose = "vvvv"
ansible.playbook = "tests/site.yaml"
ansible.host_key_checking = false
ansible.extra_vars = {
force_install: true,
test_env: true # no license
}
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment