From a112d2bed98989a47e08a4f6d637ceeade6580b8 Mon Sep 17 00:00:00 2001 From: Tim Smith Date: Wed, 13 Mar 2019 20:51:54 -0700 Subject: [PATCH] Support using bento/amazonlinux-2 when specifying just amazonlinux-2 platform Bento now includes an amazonlinux-2 box so we should use that. This should be zero impact to anyone using one of the previous images as they'll already be manually defining the box. Signed-off-by: Tim Smith --- lib/kitchen/driver/vagrant.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/kitchen/driver/vagrant.rb b/lib/kitchen/driver/vagrant.rb index f05ae60b..46d609f7 100644 --- a/lib/kitchen/driver/vagrant.rb +++ b/lib/kitchen/driver/vagrant.rb @@ -237,7 +237,7 @@ class << self # box # @api private def bento_box?(name) - name =~ /^(centos|debian|fedora|freebsd|opensuse|ubuntu|oracle|hardenedbsd)-/ + name =~ /^(centos|debian|fedora|freebsd|opensuse|ubuntu|oracle|hardenedbsd|amazonlinux)-/ end # Returns whether or not the we expect the box to work with shared folders @@ -247,7 +247,7 @@ def bento_box?(name) # @api private def safe_share?(box) return false if config[:provider] =~ /(hyperv|libvirt)/ - box =~ /^bento\/(centos|debian|fedora|opensuse|ubuntu|oracle)-/ + box =~ /^bento\/(centos|debian|fedora|opensuse|ubuntu|oracle|amazonlinux)-/ end # Return true if we found the criteria to enable the cache_directory