-
Notifications
You must be signed in to change notification settings - Fork 10
/
Vagrantfile
36 lines (31 loc) · 1.22 KB
/
Vagrantfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.box = "generic/fedora28"
config.vm.provider "virtualbox" do |v, override|
v.memory = 2048
v.cpus = 2
v.customize ["modifyvm", :id, "--cpus", "2"]
v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
end
config.vm.provider "libvirt" do |v, override|
v.driver = "kvm"
v.memory = 2048
v.cpus = 2
v.suspend_mode = "managedsave"
end
config.vm.synced_folder '.', '/vagrant', disabled: true
if Vagrant::Util::Platform.windows?
target_path = ENV['USERPROFILE'].gsub(/\\/,'/').gsub(/[[:alpha:]]{1}:/){|s|'/' + s.downcase.sub(':', '')}
config.vm.synced_folder ENV['USERPROFILE'], target_path, type: 'sshfs', sshfs_opts_append: '-o umask=000 -o uid=1000 -o gid=1000'
else
config.vm.synced_folder "/opt/fedora", "/opt", type: 'sshfs', sshfs_opts_append: '-o umask=000 -o uid=1000 -o gid=1000'
end
config.vm.provision "shell", inline: <<-SHELL
# Docker and parted packages are required to get selinux context: https://bugzilla.redhat.com/show_bug.cgi?id=1303565
sudo dnf -y update
sudo dnf install -y git livecd-tools docker parted make sudo gettext
cd /opt/
make
SHELL
end