diff --git a/.gitignore b/.gitignore index 1377554..9183973 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ *.swp +.vagrant diff --git a/Vagrantfile b/Vagrantfile new file mode 100644 index 0000000..b0f80b8 --- /dev/null +++ b/Vagrantfile @@ -0,0 +1,70 @@ +# -*- 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_share/", "/vagrant", disabled: true + + config.vm.provider :libvirt do |libvirt| + libvirt.storage :file, :size => '10G', :device => 'vdb' + end + + config.vm.define :jessie do |node| + node.vm.hostname = "bkctld-jessie" + node.vm.box = "debian/jessie64" + end + + config.vm.define :stretch do |node| + node.vm.hostname = "bkctld-stretch" + node.vm.box = "debian/stretch64" + end + + config.vm.provision "copy", type: "file" do |f| + f.source = "./" + f.destination = "~/bkctld/" + end + + config.vm.provision "deps", type: "shell" do |s| + s.inline = "DEBIAN_FRONTEND=noninteractive apt-get -yq install openssh-server btrfs-tools rsync lsb-base coreutils sed dash mount openssh-sftp-server libc6 bash-completion" + end + + $install = <