aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Iooss <nicolas.iooss@m4x.org>2019-08-31 16:14:43 +0200
committerJason Zaman <perfinion@gentoo.org>2019-12-16 20:57:02 +0800
commitb1fe23734517b4a8d4d178e318c4c5c82a2fe353 (patch)
tree8cc8fd279baec445af7954ceccfceb1ad9044bba /Vagrantfile
parentVarious: Module version bump. (diff)
downloadhardened-refpolicy-b1fe23734517b4a8d4d178e318c4c5c82a2fe353.tar.gz
hardened-refpolicy-b1fe23734517b4a8d4d178e318c4c5c82a2fe353.tar.bz2
hardened-refpolicy-b1fe23734517b4a8d4d178e318c4c5c82a2fe353.zip
Vagrantfile: upgrade VM to Fedora 30
Use the official Fedora cloud image as a base for the virtual machine. Allow defining other virual machines by putting the configuration of Fedora's one into a sub-level. Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org> Signed-off-by: Jason Zaman <perfinion@gentoo.org>
Diffstat (limited to 'Vagrantfile')
-rw-r--r--Vagrantfile71
1 files changed, 38 insertions, 33 deletions
diff --git a/Vagrantfile b/Vagrantfile
index b01db6222..6236b881f 100644
--- a/Vagrantfile
+++ b/Vagrantfile
@@ -6,41 +6,46 @@
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
- # build a Fedora 24 VM
- config.vm.box = "bento/fedora-24"
- # assign a nice hostname
- config.vm.hostname = "selinux-devel"
- # give it a private internal IP address
- config.vm.network "private_network", type: "dhcp"
+ # build a Fedora 30 VM
+ config.vm.define "fedora" do |fedora|
+ fedora.vm.box = "fedora/30-cloud-base"
+ # assign a nice hostname
+ fedora.vm.hostname = "selinux-fedora-devel"
+ # give it a private internal IP address
+ fedora.vm.network "private_network", type: "dhcp"
- config.vm.provider "virtualbox" do |vb|
- # Customize the amount of memory on the VM:
- vb.memory = "1024"
- end
+ # Customize the amount of memory on the VM
+ fedora.vm.provider "virtualbox" do |vb|
+ vb.memory = 1024
+ end
+ fedora.vm.provider "libvirt" do |lv|
+ lv.memory = 1024
+ end
- # Enable provisioning with a shell script. Additional provisioners such as
- # Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the
- # documentation for more information about their specific syntax and use.
- config.vm.provision "shell", run: "once", inline: <<-SHELL
- # get the man pages
- echo "Upgrading DNF and installing man pages..."
- dnf install -q -y man-pages >/dev/null
- dnf upgrade -q -y dnf >/dev/null
+ # Enable provisioning with a shell script. Additional provisioners such as
+ # Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the
+ # documentation for more information about their specific syntax and use.
+ fedora.vm.provision "shell", run: "once", inline: <<-SHELL
+ # get the man pages
+ echo "Upgrading DNF and installing man pages..."
+ dnf install -q -y man-pages >/dev/null
+ dnf upgrade -q -y dnf >/dev/null
- # install a few packages to make this machine ready to go out of the box
- echo "Installing SELinux dev dependencies..."
- dnf install -q -y \
- bash-completion \
- man-pages \
- vim \
- make \
- kernel-devel \
- selinux-policy-devel \
- libselinux-python3 \
- >/dev/null
+ # install a few packages to make this machine ready to go out of the box
+ echo "Installing SELinux dev dependencies..."
+ dnf install -q -y \
+ bash-completion \
+ man-pages \
+ vim \
+ make \
+ kernel-devel \
+ selinux-policy-devel \
+ libselinux-python3 \
+ >/dev/null
- # we set to permissive to allow loading and working with reference policy as opposed to fedora's fork
- echo "Setting SELinux to Permissive Mode..."
- setenforce 0
- SHELL
+ # we set to permissive to allow loading and working with reference policy as opposed to fedora's fork
+ echo "Setting SELinux to Permissive Mode..."
+ setenforce 0
+ SHELL
+ end
end