Skip to content

Commit

Permalink
chore(vagrant): mmake vagrant-aws optional
Browse files Browse the repository at this point in the history
Signed-off-by: Maximilian Huber <[email protected]>
  • Loading branch information
maxhbr committed Dec 3, 2020
1 parent fb9206f commit 1b75a59
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 6 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,10 @@ Clone from this repository.

if you need to use a proxy server please follow this additional instructions before starting with the next chapter:

* install the AWS plugin for vagrant (also if you do not setup AWS as provider)
* (optional, for support of aws as provider) install the AWS plugin for vagrant
```
$ vagrant plugin install vagrant-aws
```
(although you will not deploy to AWS, it is required, because vagrant parses the description files and finds some conditional statements which are not ignored)

* install the disk size plugin for vagrant to change the virtual disk size (new!)
```
Expand Down
10 changes: 8 additions & 2 deletions generate-box/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@
# Require configuration settings
require_relative '../shared/configuration.rb'

# Require the AWS provider plugin
require 'vagrant-aws'
unless ! Vagrant.has_plugin?("vagrant-aws")
# Require the AWS provider plugin
require 'vagrant-aws'
end

VAGRANTFILE_API_VERSION = "2"

Expand All @@ -34,6 +36,10 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|

else

unless Vagrant.has_plugin?("vagrant-aws")
raise 'vagrant-aws is not installed!'
end

# AWS can use a dummy box because its using a AMI anyway.
config.vm.box = 'aws-dummy'

Expand Down
10 changes: 8 additions & 2 deletions sw360-single/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@
# Require configuration settings
require_relative "../shared/configuration.rb"

# Require the AWS provider plugin
require 'vagrant-aws'
unless ! Vagrant.has_plugin?("vagrant-aws")
# Require the AWS provider plugin
require 'vagrant-aws'
end

VAGRANTFILE_API_VERSION = "2"

Expand Down Expand Up @@ -54,6 +56,10 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|

else

unless Vagrant.has_plugin?("vagrant-aws")
raise 'vagrant-aws is not installed!'
end

# Every Vagrant virtual box environment requires a box to build off of.
# AWS can use a dummy box because its using a AMI anyway.
config.vm.box = 'aws-dummy'
Expand Down

0 comments on commit 1b75a59

Please sign in to comment.