File: Vagrantfile

package info (click to toggle)
bats-file 0.3.0%2Bgit20230131-gbba751f-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 408 kB
  • sloc: sh: 566; makefile: 2
file content (36 lines) | stat: -rw-r--r-- 1,039 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure("2") do |config|
  config.vm.box = "ubuntu/xenial64"
  config.vm.network "public_network"
  config.vm.synced_folder ".", "/home/vagrant/bats-file/", type: "rsync",
    rsync__exclude: [
      ".git/",
      ".gitignore",
      "*.yml",
      "*.md",
      "LICENSE",
      "*.json",
      "*.log",
      "Vagrantfile",
    ],
    rsync__args: ["--verbose", "--archive", "--delete", "-z"]

  config.vm.provider "virtualbox" do |vb|
    # vb.gui = true
    vb.memory = "1024"
  end
  config.vm.provision "shell", privileged: true, inline: <<-SHELL
    apt-get update
    apt-get install -y git vim curl
    ln -s /usr/bin/python3 /usr/bin/python
  SHELL

  config.vm.provision "shell", privileged: false, inline: <<-SHELL
    mkdir -p $HOME/.local/bin
    echo 'export PATH="$PATH:$HOME/.local/bin"' >> /home/vagrant/.bashrc
    git clone --depth 1 https://github.com/bats-core/bats-support /home/vagrant/bats-support
    /home/vagrant/bats-file/script/install-bats.sh
  SHELL
end