1
0
mirror of https://github.com/eoli3n/dotfiles synced 2024-12-04 17:28:14 +01:00
eoli3n-dotfiles/vagrant/centos/Vagrantfile
2017-12-22 18:23:34 +01:00

39 lines
859 B
Ruby

# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "centos/7"
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.name = "centos_dotfiles"
vb.memory = "1024"
vb.cpus = 2
end
config.vm.provision "shell", inline: <<-SHELL
yum install ansible git -y
echo "centos" > /etc/hostname
hostname centos
SHELL
$script = <<-SCRIPT
# PREP
touch ~/.viminfo; rm ~/.viminfo
touch ~/.vimrc; rm ~/.vimrc
# EXEC
git clone --recursive https://github.com/eoli3n/dotfiles
cd dotfiles
git submodule update --init --recursive
./install.sh server
echo -e "vagrant" | chsh -s /bin/zsh
SCRIPT
config.vm.provision "shell", inline: $script, privileged: false
end