Skip to content

Commit

Permalink
Work around issue in vagrant-aws
Browse files Browse the repository at this point in the history
URL: mitchellh/vagrant-aws#566
Signed-off-by: Samuli Seppänen <[email protected]>
  • Loading branch information
Samuli Seppänen committed Oct 31, 2020
1 parent c7e339c commit 09fb4b1
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Vagrantfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :

# Workaround https://github.com/mitchellh/vagrant-aws/issues/566
class Hash
def slice(*keep_keys)
h = {}
keep_keys.each { |key| h[key] = fetch(key) if has_key?(key) }
h
end unless Hash.method_defined?(:slice)
def except(*less_keys)
slice(*keys - less_keys)
end unless Hash.method_defined?(:except)
end

Vagrant.configure("2") do |config|

config.vm.define "packager" do |box|
Expand Down

0 comments on commit 09fb4b1

Please sign in to comment.