compass-adapters/cobbler/snippets/kickstart_client.rb
xiaodongwang b327ac4bad do not set no_proxy if http_proxy is not set
Change-Id: Id8e0bbed0699d73eaf42778cf5295afd8f0af6b9
2014-10-07 12:10:05 -07:00

27 lines
779 B
Ruby

cat << EOL > /etc/chef/client.rb
log_level :info
log_location '/dev/null'
#if $getVar('chef_url', '') != ""
chef_server_url '$chef_url'
#end if
#if $getVar('proxy', '') != ""
http_proxy '$proxy'
https_proxy '$proxy'
ENV['http_proxy'] = '$proxy'
ENV['https_proxy'] = '$proxy'
ENV['HTTP_PROXY'] = '$proxy'
ENV['HTTPS_PROXY'] = '$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
pid_file '/var/run/chef-client.pid'
# Using default node name (fqdn)
no_lazy_load true
EOL