Created
August 26, 2020 06:11
-
-
Save invad0r/9851d1a40819fd4e739794180b622f08 to your computer and use it in GitHub Desktop.
Vagrant file to qickly boot up centos 7 or 8 vm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vagrant up centos7 | |
vagrant up centos8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
VAGRANTFILE_API_VERSION = "2" | |
VM_CPUCOUNT = "2" | |
VM_RAM = "1024" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
config.vm.define "centos7" do |centos7| | |
centos7.vm.box = "centos/7" | |
centos7.vm.hostname = "centos7" | |
centos7.vm.box_check_update = false | |
centos7.vm.synced_folder '.', '/vagrant', disabled: true | |
#centos7.vm.network "public_network", bridge: "en3: Thunderbolt-Ethernet" | |
centos7.vm.provider :virtualbox do |v| | |
v.gui = false | |
v.memory = "#{VM_RAM}" | |
v.cpus = "#{VM_CPUCOUNT}" | |
end | |
centos7.vm.provision "shell", inline: <<-SHELL | |
yum update -y | |
#yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm | |
#yum install jq | |
SHELL | |
end | |
config.vm.define "centos8", autostart: false do |centos8| | |
centos8.vm.box = "centos/8" | |
centos8.vm.hostname = "centos8" | |
centos8.vm.box_check_update = false | |
centos8.vm.synced_folder '.', '/vagrant', disabled: true | |
centos8.vm.provider :virtualbox do |v| | |
v.gui = false | |
v.memory = "#{VM_RAM}" | |
v.cpus = "#{VM_CPUCOUNT}" | |
end | |
centos8.vm.provision "shell", inline: <<-SHELL | |
yum update -y | |
SHELL | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment