Advertisement
Guest User

Untitled

a guest
Sep 11th, 2017
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.61 KB | None | 0 0
  1. Vagrant.configure("2") do |config|
  2. # config.ssh.username = 'root'
  3. # config.ssh.password = 'vagrant'
  4. # config.ssh.insert_key = 'false'
  5. config.ssh.keys_only = false
  6. config.ssh.forward_agent = true
  7. # (1..3).each do |i|
  8. config.vm.define :master do |main|
  9. main.vm.box = "ubuntu/xenial64"
  10. main.vm.hostname = "master"
  11. # main.vm.network "forwarded_port", guest: 80, host: 8085
  12. # main.vm.network "forwarded_port", guest: 80, host: 8080, host_ip: "127.0.0.1"
  13. main.vm.network "private_network", ip: "192.168.10.11"
  14. main.vm.network "public_network"
  15. # main.vm.provision "file", source: "~/.ssh/id_rsa.pub", destination: "~/.ssh/id_rsa.pub"
  16. # main.vm.synced_folder "../data", "/vagrant_data"
  17. main.vm.provision "shell", inline: <<-SHELL
  18. echo "ubuntu:ubuntu" | sudo chpasswd
  19. SHELL
  20. main.vm.provider :virtualbox do |vb|
  21. vb.customize ["modifyvm", :id, "--memory", "512"]
  22. end
  23. end
  24. config.vm.define :slave do |main|
  25. main.vm.box = "ubuntu/xenial64"
  26. main.vm.hostname = "slave"
  27. # main.vm.network "forwarded_port", guest: 80, host: 8080
  28. # main.vm.network "forwarded_port", guest: 80, host: 8080, host_ip: "127.0.0.1"
  29. main.vm.network "private_network", ip: "192.168.10.11"
  30. main.vm.network "public_network"
  31. # main.vm.provision "file", source: "~/.ssh/id_rsa.pub", destination: "~/.ssh/id_rsa.pub"
  32. # main.vm.synced_folder "../data", "/vagrant_data"
  33. main.vm.provision "shell", inline: <<-SHELL
  34. echo "ubuntu:ubuntu" | sudo chpasswd
  35. SHELL
  36. main.vm.provider :virtualbox do |vb|
  37. vb.customize ["modifyvm", :id, "--memory", "512"]
  38. end
  39. end
  40. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement