Skip to content

Instantly share code, notes, and snippets.

@brandonsoto
Created February 28, 2017 04:47
Show Gist options
  • Save brandonsoto/27f297958a1e7a3766f20dae8d1b9def to your computer and use it in GitHub Desktop.
Save brandonsoto/27f297958a1e7a3766f20dae8d1b9def to your computer and use it in GitHub Desktop.
RHEL7.3 vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
required_plugins = %w(vagrant-share vagrant-registration)
plugins_to_install = required_plugins.select { |plugin| not Vagrant.has_plugin? plugin }
if not plugins_to_install.empty?
puts "Installing plugins: #{plugins_to_install.join(' ')}"
if system "vagrant plugin install #{plugins_to_install.join(' ')}"
exec "vagrant #{ARGV.join(' ')}"
else
abort "Installation of one or more plugins has failed. Aborting."
end
end
Vagrant.configure("2") do |config|
config.vm.box = "iamseth/rhel-7.3"
# config.registration.username = ''
# config.registration.password = ''
config.registration.manager = 'subscription_manager'
config.vm.synced_folder ".", "/vagrant_data"
config.vm.provider "virtualbox" do |vb|
# # Display the VirtualBox GUI when booting the machine
vb.gui = true
#
# # Customize the amount of memory on the VM:
vb.memory = "1024"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment