Skip to content

Commit

Permalink
Merge pull request #4661 from jason-riddle/patch-1
Browse files Browse the repository at this point in the history
Add ENV['no_proxy'] to chef provisioner if no_proxy is detected
  • Loading branch information
Sander van Harmelen committed Jan 15, 2016
2 parents 2d79e64 + ca39512 commit 52d1e21
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
4 changes: 3 additions & 1 deletion builtin/provisioners/chef/linux_provisioner_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -328,4 +328,6 @@ ENV['https_proxy'] = "https://proxy.local"
ENV['HTTPS_PROXY'] = "https://proxy.local"
no_proxy "http://local.local,https://local.local"`
no_proxy "http://local.local,https://local.local"
ENV['no_proxy'] = "http://local.local,https://local.local"`
6 changes: 5 additions & 1 deletion builtin/provisioners/chef/resource_provisioner.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,11 @@ ENV['https_proxy'] = "{{ .HTTPSProxy }}"
ENV['HTTPS_PROXY'] = "{{ .HTTPSProxy }}"
{{ end }}
{{ if .NOProxy }}no_proxy "{{ join .NOProxy "," }}"{{ end }}
{{ if .NOProxy }}
no_proxy "{{ join .NOProxy "," }}"
ENV['no_proxy'] = "{{ join .NOProxy "," }}"
{{ end }}
{{ if .SSLVerifyMode }}ssl_verify_mode {{ .SSLVerifyMode }}{{ end }}
{{ if .DisableReporting }}enable_reporting false{{ end }}
Expand Down
4 changes: 3 additions & 1 deletion builtin/provisioners/chef/windows_provisioner_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -355,4 +355,6 @@ ENV['https_proxy'] = "https://proxy.local"
ENV['HTTPS_PROXY'] = "https://proxy.local"
no_proxy "http://local.local,https://local.local"`
no_proxy "http://local.local,https://local.local"
ENV['no_proxy'] = "http://local.local,https://local.local"`

0 comments on commit 52d1e21

Please sign in to comment.