Skip to content

Instantly share code, notes, and snippets.

@anthonyinfinity
Created February 21, 2019 12:37
Show Gist options
  • Save anthonyinfinity/a63e7d99bfd1fb4847b87539c99a62af to your computer and use it in GitHub Desktop.
Save anthonyinfinity/a63e7d99bfd1fb4847b87539c99a62af to your computer and use it in GitHub Desktop.
vagrantfile for centos, solaris, windows and aws ami
Vagrant.configure("2") do |config|
config.vm.define "amihost", primary: true do |amihost|
amihost.vm.provision "shell", path: "scripts/yum-apt-startup.sh"
amihost.vm.box = "mwhooker/amazon-linux"
amihost.vm.hostname = 'amihost'
amihost.vm.network :private_network, ip: "192.168.56.105"
amihost.vm.network :forwarded_port, guest: 22, host: 10122, id: "ssh"
amihost.vm.provider :virtualbox do |v|
v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
v.customize ["modifyvm", :id, "--memory", 512]
v.customize ["modifyvm", :id, "--name", "amihost"]
end
end
end
Vagrant.configure("2") do |config|
config.vm.define "centoshost", primary: true do |centoshost|
centoshost.vm.provision "shell", path: "scripts/yum-apt-startup.sh"
centoshost.vm.box = "centos/7"
centoshost.vm.hostname = 'centoshost'
centoshost.vm.network :private_network, ip: "192.168.56.101"
centoshost.vm.network :forwarded_port, guest: 22, host: 10122, id: "ssh"
centoshost.vm.provider :virtualbox do |v|
v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
v.customize ["modifyvm", :id, "--memory", 512]
v.customize ["modifyvm", :id, "--name", "centoshost"]
end
end
end
Vagrant.configure("2") do |config|
config.vm.define "solarishost", primary: true do |solarishost|
solarishost.vm.provision "shell", path: "scripts/yum-apt-startup.sh"
solarishost.vm.box = "tnarik/solaris10-minimal"
solarishost.vm.hostname = 'solarishost'
solarishost.vm.network :private_network, ip: "192.168.56.110"
solarishost.vm.network :forwarded_port, guest: 22, host: 10122, id: "ssh"
solarishost.vm.provider :virtualbox do |v|
v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
v.customize ["modifyvm", :id, "--memory", 512]
v.customize ["modifyvm", :id, "--name", "solarishost"]
end
end
end
Vagrant.configure("2") do |config|
config.vm.define "windowshost", primary: true do |windowshost|
windowshost.vm.provision "shell", path: "scripts/yum-apt-startup.sh"
windowshost.vm.box = "gusztavvargadr/windowsserver2016"
windowshost.vm.hostname = 'windowshost'
windowshost.vm.network :private_network, ip: "192.168.56.115"
windowshost.vm.network :forwarded_port, guest: 22, host: 10122, id: "ssh"
windowshost.vm.provider :virtualbox do |v|
v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
v.customize ["modifyvm", :id, "--memory", 512]
v.customize ["modifyvm", :id, "--name", "windowshost"]
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment