SHARE
TWEET

Untitled

a guest May 26th, 2019 92 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Vagrant.configure(2) do |config|
  2.  
  3.  
  4.   config.vm.define "redis-1" do |subconfig|
  5.     subconfig.vm.box = "centos/7"
  6.     subconfig.vm.hostname="redis-1"
  7.     subconfig.vm.network :private_network, ip: "192.168.50.11"
  8.    config.vm.provider "virtualbox" do |vb|
  9.     vb.memory = "1024"
  10.     vb.cpus = "1"
  11.   end
  12.   config.ssh.insert_key = false
  13.   config.ssh.private_key_path = ['~/.vagrant.d/insecure_private_key', '~/.ssh/id_rsa']  
  14.   config.vm.provision "file", source: "~/.ssh/id_rsa.pub", destination: "~/.ssh/authorized_keys"
  15.  
  16.   end
  17.  
  18.   config.vm.define "redis-2" do |subconfig|
  19.     subconfig.vm.box = "centos/7"
  20.     subconfig.vm.hostname="redis-2"
  21.     subconfig.vm.network :private_network, ip: "192.168.50.12"
  22.   config.vm.provider "virtualbox" do |vb|
  23.     vb.memory = "1024"
  24.     vb.cpus = "1"
  25.   end
  26.   config.ssh.insert_key = false
  27.   config.ssh.private_key_path = ['~/.vagrant.d/insecure_private_key', '~/.ssh/id_rsa']
  28.   config.vm.provision "file", source: "~/.ssh/id_rsa.pub", destination: "~/.ssh/authorized_keys"  
  29.  
  30.   end
  31.  
  32.   config.vm.define "redis-3" do |subconfig|
  33.     subconfig.vm.box = "centos/7"
  34.     subconfig.vm.hostname="redis-3"
  35.     subconfig.vm.network :private_network, ip: "192.168.50.13"
  36.   config.vm.provider "virtualbox" do |vb|
  37.     vb.memory = "1024"
  38.     vb.cpus = "1"
  39.   end
  40.   config.ssh.insert_key = false
  41.   config.ssh.private_key_path = ['~/.vagrant.d/insecure_private_key', '~/.ssh/id_rsa']
  42.   config.vm.provision "file", source: "~/.ssh/id_rsa.pub", destination: "~/.ssh/authorized_keys"  
  43.   end
  44.  
  45.  
  46.   config.vm.define "redis-4" do |subconfig|
  47.     subconfig.vm.box = "centos/7"
  48.     subconfig.vm.hostname="redis-4"
  49.     subconfig.vm.network :private_network, ip: "192.168.50.14"
  50.   config.vm.provider "virtualbox" do |vb|
  51.     vb.memory = "1024"
  52.     vb.cpus = "1"
  53.   end
  54.   config.ssh.insert_key = false
  55.   config.ssh.private_key_path = ['~/.vagrant.d/insecure_private_key', '~/.ssh/id_rsa']
  56.   config.vm.provision "file", source: "~/.ssh/id_rsa.pub", destination: "~/.ssh/authorized_keys"  
  57.  
  58.   end
  59.  
  60.  
  61.   config.vm.define "redis-5" do |subconfig|
  62.     subconfig.vm.box = "centos/7"
  63.     subconfig.vm.hostname="redis-5"
  64.     subconfig.vm.network :private_network, ip: "192.168.50.15"
  65.   config.vm.provider "virtualbox" do |vb|
  66.     vb.memory = "1024"
  67.     vb.cpus = "1"
  68.   end
  69.   config.ssh.insert_key = false
  70.   config.ssh.private_key_path = ['~/.vagrant.d/insecure_private_key', '~/.ssh/id_rsa']
  71.   config.vm.provision "file", source: "~/.ssh/id_rsa.pub", destination: "~/.ssh/authorized_keys"  
  72.  
  73.   end
  74.  
  75.   config.vm.define "redis-6" do |subconfig|
  76.     subconfig.vm.box = "centos/7"
  77.     subconfig.vm.hostname="redis-6"
  78.     subconfig.vm.network :private_network, ip: "192.168.50.16"
  79.   config.vm.provider "virtualbox" do |vb|
  80.     vb.memory = "1024"
  81.     vb.cpus = "1"
  82.   end
  83.   config.ssh.insert_key = false
  84.   config.ssh.private_key_path = ['~/.vagrant.d/insecure_private_key', '~/.ssh/id_rsa']
  85.   config.vm.provision "file", source: "~/.ssh/id_rsa.pub", destination: "~/.ssh/authorized_keys"  
  86.  
  87.   end
  88.  
  89. ##    config.vm.provision "ansible" do |ansible|
  90. ##    ansible.playbook = "provison.yml"
  91. ## end
  92.  
  93. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top