Merge "fix gem install failure for ubuntu" into dev/experimental
This commit is contained in:
commit
f50b6fc7e0
@ -44,8 +44,17 @@ node['mysql']['client']['packages'].each do |name|
|
|||||||
resources("package[#{name}]").run_action(:install)
|
resources("package[#{name}]").run_action(:install)
|
||||||
end
|
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?
|
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
|
else
|
||||||
gem_package 'mysql' do
|
gem_package 'mysql' do
|
||||||
options("--clear-sources --source #{node['local_repo']}/gem_repo/")
|
options("--clear-sources --source #{node['local_repo']}/gem_repo/")
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
cat << EOF > /etc/apt/apt.conf
|
cat << EOF > /etc/apt/apt.conf
|
||||||
#if $getVar('proxy', '') != ''
|
#if $getVar('proxy', '') != ''
|
||||||
Acquire::http::Proxy "$proxy"
|
Acquire::http::Proxy "$proxy";
|
||||||
#end if
|
#end if
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user