Sha256: a2e3c09f1352ee9d1c99fbe490de07c4eaf09a555e42d102d0a111f42f8492de

Contents?: true

Size: 786 Bytes

Versions: 3

Compression:

Stored size: 786 Bytes

Contents

require "open-uri"

Vagrant.configure("2") do |config|
  config.ssh.insert_key = false

  [:app].each_with_index do |role, i|
    config.vm.define(role, primary: true) do |primary|
      primary.vm.define role
      primary.vm.box = "hashicorp/bionic64"
      primary.vm.network "forwarded_port", guest: 22, host: "222#{i}".to_i
      primary.vm.provision :shell, inline: "sudo apt-get -y install git-core"

      vagrantkey = open("https://raw.githubusercontent.com/mitchellh/vagrant/master/keys/vagrant.pub", "r", &:read)

      primary.vm.provision :shell,
                           inline: <<-INLINE
          install -d -m 700 /root/.ssh
          echo -e "#{vagrantkey}" > /root/.ssh/authorized_keys
          chmod 0600 /root/.ssh/authorized_keys
      INLINE
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
capistrano-3.17.2 spec/support/Vagrantfile
capistrano-3.17.1 spec/support/Vagrantfile
capistrano-3.17.0 spec/support/Vagrantfile