Skip to content

Commit

Permalink
Resolve chefstyle warnings in 1.7.4
Browse files Browse the repository at this point in the history
Signed-off-by: Tim Smith <tsmith@chef.io>
  • Loading branch information
tas50 committed Apr 10, 2021
1 parent 40f6421 commit cbdc7fe
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions lib/kitchen/driver/ec2.rb
Original file line number Diff line number Diff line change
Expand Up @@ -319,17 +319,14 @@ def image
end

def default_instance_type
@instance_type ||= begin
# We default to the free tier (t2.micro for hvm, t1.micro for paravirtual)
if image && image.virtualization_type == "hvm"
info("instance_type not specified. Using free tier t2.micro instance ...")
"t2.micro"
else
info("instance_type not specified. Using free tier t1.micro instance since" \
" image is paravirtual (pick an hvm image to use the superior t2.micro!) ...")
"t1.micro"
end
end
@instance_type ||= if image && image.virtualization_type == "hvm"
info("instance_type not specified. Using free tier t2.micro instance ...")
"t2.micro"
else
info("instance_type not specified. Using free tier t1.micro instance since" \
" image is paravirtual (pick an hvm image to use the superior t2.micro!) ...")
"t1.micro"
end
end

# The actual platform is the platform detected from the image
Expand Down

0 comments on commit cbdc7fe

Please # to comment.