Skip to content

Commit

Permalink
Update VagrantFile to work with modern vagrant
Browse files Browse the repository at this point in the history
We had let this bitrot and it required using an old version of Vagrant.
Unfortunatly there is the need to put in a hack due to this issue on the
vagrant-aws provider
mitchellh/vagrant-aws#566. I suspect that this
provider is now abandoned as there is even a PR open to fix it
mitchellh/vagrant-aws#575. I propose that we
look to remove vagrant in the not too distant future.
  • Loading branch information
Lee Porte committed Feb 16, 2021
1 parent e820286 commit 476ef66
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion vagrant/Vagrantfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,22 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.require_version ">= 1.8.0"
class Hash
unless Hash.method_defined?(:slice)
def slice(*keep_keys)
h = {}
keep_keys.each { |key| h[key] = fetch(key) if key?(key) }
h
end
end
unless Hash.method_defined?(:except)
def except(*less_keys)
slice(*keys - less_keys)
end
end
end

Vagrant.require_version ">= 2.2.14"

# We use bootstrap concourse SG and a subnet in default VPC in each region
AWS_ACCOUNT = ENV.fetch("AWS_ACCOUNT", "dev")
Expand Down

0 comments on commit 476ef66

Please sign in to comment.