Skip to content
This repository was archived by the owner on Dec 26, 2020. It is now read-only.

Commit 490be55

Browse files
authored
Merge pull request #100 from fullyint/missing-vagrant-plugins
Accommodate missing plugins in kitchen_vagrant_block.rb
2 parents fc42747 + a11322a commit 490be55

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

.kitchen.vagrant.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,6 @@ provisioner:
2323
transport:
2424
max_ssh_sessions: 5
2525

26-
transport:
27-
max_ssh_sessions: 5
28-
29-
3026
platforms:
3127
- name: ubuntu-12.04
3228
driver_config:

kitchen_vagrant_block.rb

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
11
# This is a Vagrant block to allow proxy settings to be carried into Kitchen
22
# You need this for all of yum/apt etc. to work!
3-
unless ENV['http_proxy'].empty? || Vagrant.has_plugin?("vagrant-proxyconf")
3+
unless ENV['http_proxy'].nil? || Vagrant.has_plugin?("vagrant-proxyconf")
44
raise "Missing required plugin 'vagrant-proxyconf' to support HTTP(S) proxies, run `vagrant plugin install vagrant-proxyconf`"
55
end
66

77
Vagrant.configure(2) do |config|
8-
config.proxy.http = "#{ENV['http_proxy']}"
9-
config.proxy.https = "#{ENV['https_proxy']}"
10-
config.proxy.no_proxy = "localhost,127.0.0.1"
8+
if Vagrant.has_plugin?("vagrant-proxyconf")
9+
config.proxy.http = "#{ENV['http_proxy']}"
10+
config.proxy.https = "#{ENV['https_proxy']}"
11+
config.proxy.no_proxy = "localhost,127.0.0.1"
12+
end
1113

1214
# You may have vagrant-vbguest plugin installed to keep your images up to date
1315
# - but will probably have VBoxAddition build issues with the foreign boxes listed in .kitchen.vagrant.yml
14-
config.vbguest.auto_update = false
16+
if Vagrant.has_plugin?("vagrant-vbguest")
17+
config.vbguest.auto_update = false
18+
end
1519
end

0 commit comments

Comments
 (0)