diff --git a/chef/cookbooks/mysql/recipes/ruby.rb b/chef/cookbooks/mysql/recipes/ruby.rb index 9f0d9ad..2258244 100644 --- a/chef/cookbooks/mysql/recipes/ruby.rb +++ b/chef/cookbooks/mysql/recipes/ruby.rb @@ -44,8 +44,17 @@ node['mysql']['client']['packages'].each do |name| resources("package[#{name}]").run_action(:install) end +# unknown reason cause chef-client not to honor .gemrc immediately +# even not until timeout is reached, so specify the options explicitly. if node['local_repo'].nil? or node['local_repo'].empty? - chef_gem 'mysql' + if node['proxy_url'] + gem_package 'mysql' do + options("--http-proxy #{node['proxy_url']}") + action :install + end + else + chef_gem 'mysql' + end else gem_package 'mysql' do options("--clear-sources --source #{node['local_repo']}/gem_repo/") diff --git a/cobbler/snippets/preseed_post_apt_repo_config b/cobbler/snippets/preseed_post_apt_repo_config index eb509b9..2a92ae8 100644 --- a/cobbler/snippets/preseed_post_apt_repo_config +++ b/cobbler/snippets/preseed_post_apt_repo_config @@ -1,6 +1,6 @@ cat << EOF > /etc/apt/apt.conf #if $getVar('proxy', '') != '' -Acquire::http::Proxy "$proxy" +Acquire::http::Proxy "$proxy"; #end if EOF