Skip to content
Snippets Groups Projects
Commit c5a4e46f authored by John Garbutt's avatar John Garbutt
Browse files

Disable selinux during provision

To avoid a reboot when running the kayobe scripts, we disable selinux
before running the scripts. We do this using the provision reload plugin
that allows us to do a vagrant reload while provisioning the VM.
parent 42605939
No related branches found
No related tags found
No related merge requests found
...@@ -69,6 +69,20 @@ Vagrant.configure("2") do |config| ...@@ -69,6 +69,20 @@ Vagrant.configure("2") do |config|
# documentation for more information about their specific syntax and use. # documentation for more information about their specific syntax and use.
# #
# Set privileged: false to run as vagrant user. # Set privileged: false to run as vagrant user.
# Disable selinux, then reboot to apply the change
config.vm.provision "shell", inline: <<-SHELL
echo "cat > /etc/selinux/config << EOF
SELINUX=disabled
SELINUXTYPE=targeted
EOF" | sudo -s
cat /etc/selinux/config
SHELL
# NOTE: Reboot to apply selinux change, requires the reload plugin:
# vagrant plugin install vagrant-reload
config.vm.provision :reload
config.vm.provision "shell", privileged: false, inline: <<-SHELL config.vm.provision "shell", privileged: false, inline: <<-SHELL
sudo ifup eth1 sudo ifup eth1
......
...@@ -12,6 +12,7 @@ First, ensure that Vagrant is installed and correctly configured to use ...@@ -12,6 +12,7 @@ First, ensure that Vagrant is installed and correctly configured to use
virtual box. Also install the following vagrant plugins: virtual box. Also install the following vagrant plugins:
vagrant plugin install vagrant-vbguest vagrant plugin install vagrant-vbguest
vagrant plugin install vagrant-reload
Note: if using Ubuntu 16.04 LTS, you may be unable to install any plugins. To Note: if using Ubuntu 16.04 LTS, you may be unable to install any plugins. To
work around this install the upstream version from www.virtualbox.org. work around this install the upstream version from www.virtualbox.org.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment