0
我正在運行一個配方,這取決於多個食譜,其中一個嘗試克隆github回購,並在屬性/ fair.rb(https://github.com/priestjim/chef-openresty/blob/master/attributes/fair.rb)中爲其食譜中的屬性提供url:廚師屬性不會覆蓋
# For more information checkout https://github.com/gnosek/nginx-upstream-fair
default['openresty']['fair']['url'] = 'git://github.com/gnosek/nginx-upstream-fair.git'
我需要通過乘坐這個屬性給在SSH代替的HTTPS端點所以在我的食譜,我創建屬性/ fair.rb放下:
override['openresty']['fair']['url'] = 'https://github.com/gnosek/nginx-upstream-fair.git'
但是當我運行廚師獨奏使用vagrant,它失敗以下:
Mixlib::ShellOut::ShellCommandFailed
==> default: ------------------------------------
==> default: Expected process to exit with [0], but received '128'
==> default: ---- Begin output of git ls-remote "git://github.com/gnosek/nginx-upstream-fair.git" "master*" ----
==> default: STDOUT:
==> default: STDERR: fatal: unable to connect to github.com:
==> default: github.com[0: 192.30.252.131]: errno=Connection timed out
==> default: ---- End output of git ls-remote "git://github.com/gnosek/nginx-upstream-fair.git" "master*" ----
==> default: Ran git ls-remote "git://github.com/gnosek/nginx-upstream-fair.git" "master*" returned 128
==> default:
==> default: Resource Declaration:
==> default: ---------------------
==> default: # In /tmp/vagrant-chef/97b7f5ef6e972aa934bfb7ea6a5db3bb/cookbooks/openresty/recipes/fair_module.rb
==> default:
==> default: 26: git module_path do
==> default: 27: repository node['openresty']['fair']['url']
==> default: 28: reference 'master'
==> default: 29: action :checkout
==> default: 30: not_if { ::File.exists?(module_path) }
==> default: 31: end
==> default: 32:
==> default:
==> default: Compiled Resource:
==> default: ------------------
==> default: # Declared in /tmp/vagrant-chef/97b7f5ef6e972aa934bfb7ea6a5db3bb/cookbooks/openresty/recipes/fair_module.rb:26:in `from_file'
==> default:
==> default: git("/var/chef/cache/nginx-upstream-fair") do
==> default: action [:checkout]
==> default: retries 0
==> default: retry_delay 2
==> default: default_guard_interpreter :default
==> default: destination "/var/chef/cache/nginx-upstream-fair"
==> default: enable_checkout true
==> default: revision "master"
==> default: remote "origin"
==> default: checkout_branch "deploy"
==> default: declared_type :git
==> default: cookbook_name :openresty
==> default: recipe_name "fair_module"
==> default: repository "git://github.com/gnosek/nginx-upstream-fair.git"
==> default: not_if { #code block }
==> default: end
Ran git ls-remote "git://github.com/gnosek/nginx-upstream-fair.git" "master*" returned 128
==> default: [2016-02-23T01:03:00+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
正如你所看到的,由於某種原因仍然需要ssh端點。任何想法爲什麼?
運行列表是否包含食譜中的屬性被覆蓋的食譜? –