do not set no_proxy if http_proxy is not set

Change-Id: Id8e0bbed0699d73eaf42778cf5295afd8f0af6b9
This commit is contained in:
xiaodongwang 2014-10-06 17:30:47 -07:00
parent 7182c5db3a
commit b327ac4bad
2 changed files with 6 additions and 4 deletions

View File

@ -11,11 +11,12 @@ ENV['http_proxy'] = '$proxy'
ENV['https_proxy'] = '$proxy'
ENV['HTTP_PROXY'] = '$proxy'
ENV['HTTPS_PROXY'] = '$proxy'
#end if
#if $getVar('ignore_proxy', '') != ""
#if $getVar('ignore_proxy', '') != ""
#set ignore_proxy = ','.join([proxy.strip() for proxy in $ignore_proxy.split(',') if proxy.strip()])
no_proxy '$ignore_proxy'
ENV['no_proxy'] = '$ignore_proxy'
ENV['NO_PROXY'] = '$ignore_proxy'
#end if
#end if
validation_client_name 'chef-validator'
json_attribs nil

View File

@ -10,11 +10,12 @@ echo "ENV['http_proxy'] = '$proxy'" >> /target/etc/chef/client.rb; \
echo "ENV['https_proxy'] = '$proxy'" >> /target/etc/chef/client.rb; \
echo "ENV['HTTP_PROXY'] = '$proxy'" >> /target/etc/chef/client.rb; \
echo "ENV['HTTPS_PROXY'] = '$proxy'" >> /target/etc/chef/client.rb; \
#end if
#if $getVar('ignore_proxy', '') != ""
#if $getVar('ignore_proxy', '') != ""
#set ignore_proxy = ','.join([proxy.strip() for proxy in $ignore_proxy.split(',') if proxy.strip()])
echo "no_proxy '$ignore_proxy'" >> /target/etc/chef/client.rb; \
echo "ENV['no_proxy'] = '$ignore_proxy'" >> /target/etc/chef/client.rb; \
echo "ENV['NO_PROXY'] = '$ignore_proxy'" >> /target/etc/chef/client.rb; \
#end if
#end if
#if $getVar('chef_node_name', '') != ""
echo "node_name '$chef_node_name'" >> /target/etc/chef/client.rb; \