fix gem install failure for ubuntu
chef-client gem install does not honor .gemrc in time, so specify the http-proxy option explicitly. moreover, post-apt-config kickstart file has a syntax error, which is also fixed in the patch. Change-Id: Iadf78b6c0aff691e3f6824c20e906b75b681e848 Closes-bug: #1393967 Closes-bug: #1396948
This commit is contained in:
parent
7fee12db99
commit
a375b37153
@ -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/")
|
||||
|
@ -1,6 +1,6 @@
|
||||
cat << EOF > /etc/apt/apt.conf
|
||||
#if $getVar('proxy', '') != ''
|
||||
Acquire::http::Proxy "$proxy"
|
||||
Acquire::http::Proxy "$proxy";
|
||||
#end if
|
||||
EOF
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user