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.
This commit is contained in:
parent
42605939a4
commit
c5a4e46f4b
14
Vagrantfile
vendored
14
Vagrantfile
vendored
@ -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
|
|||||||
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.
|
||||||
|
Loading…
Reference in New Issue
Block a user