Add a Vagrantfile for testing
This commit is contained in:
parent
d6469e4e5b
commit
8263ca83e2
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
.vagrant
|
27
Vagrantfile
vendored
Normal file
27
Vagrantfile
vendored
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
# -*- 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' ]
|
||||||
|
|
||||||
|
$deps = <<SCRIPT
|
||||||
|
mkdir -p /etc/shellpki
|
||||||
|
id shellpki 2>&1 >/dev/null || useradd shellpki --system -M --home-dir /etc/shellpki --shell /usr/sbin/nologin
|
||||||
|
ln -sf /vagrant/openssl.cnf /etc/shellpki/
|
||||||
|
ln -sf /vagrant/shellpki.sh /usr/local/sbin/shellpki
|
||||||
|
SCRIPT
|
||||||
|
|
||||||
|
config.vm.define :shellpki do |node|
|
||||||
|
node.vm.hostname = "shellpki"
|
||||||
|
node.vm.box = "debian/stretch64"
|
||||||
|
|
||||||
|
node.vm.provision "deps", type: "shell", :inline => $deps
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
Loading…
Reference in a new issue