An example vagrant file with shell provision on CentOS

Vagrant.configure(“2”) do |config|

config.vm.box = “bento/centos-7.2”
config.vm.network “forwarded_port”, guest: 80, host: 8080
config.vm.provider “virtualbox” do |vb|
vb.gui = true
vb.memory = “6144”
end

config.vm.provision “shell”, inline: <<-SHELL
sudo -i
yum -y group install ‘gnome desktop’
systemctl isolate graphical.target
systemctl set-default graphical.target
SHELL
end

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s