Add a Vagrantfile for testing

This commit is contained in:
Victor LABORIE 2018-12-21 15:23:17 +01:00
parent 7179cfefc8
commit 5dfc941172
2 changed files with 46 additions and 0 deletions

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
.vagrant

45
Vagrantfile vendored Normal file
View file

@ -0,0 +1,45 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant::DEFAULT_SERVER_URL.replace('https://vagrantcloud.com')
# Load ~/.VagrantFile if exist, permit local config provider
vagrantfile = File.join("#{Dir.home}", '.VagrantFile')
load File.expand_path(vagrantfile) if File.exists?(vagrantfile)
Vagrant.configure('2') do |config|
config.vm.synced_folder "./", "/vagrant", type: "rsync", rsync__exclude: [ '.vagrant', '.git', 'config/config.ini' ]
config.vm.network "forwarded_port", guest: 80, host: 8080, auto_correct: true
config.vm.network "forwarded_port", guest: 443, host: 8443, auto_correct: true
$deps = <<SCRIPT
rm -f /usr/share/scripts/evocheck.sh
ln -s /vagrant/evocheck.sh /usr/share/scripts/evocheck.sh
cat >/etc/evocheck.cf <<EOF
IS_CUSTOMSUDOERS=0
IS_VARTMPFS=0
IS_USRRO=0
IS_TMPNOEXEC=0
IS_SSHALLOWUSERS=0
IS_ALERT5MINIFW=0
IS_MINIFW=0
IS_MINIFWPERMS=0
IS_EVOBACKUP=0
IS_MUNINRUNNING=0
IS_EVOLINUXSUDOGROUP=0
IS_LOG2MAILSYSTEMDUNIT=0
IS_LISTUPGRADE=0
IS_EVOMAINTENANCECONF=0
EOF
SCRIPT
config.vm.define :evocheck do |node|
node.vm.hostname = "evocheck.example.com"
node.vm.box = "evolix/evolinux"
node.vm.provision "deps", type: "shell", :inline => $deps
end
end