1
我有這樣的片段在廚師獨奏配方爲什麼廚師在這裏抱怨候選版?
package "myserver" do
action :upgrade
source "/tmp/myserver-12.4.0-16052.noarch.rpm"
provider Chef::Provider::Package::Rpm
end
但廚師說:
INFO: Processing package[myserver] action upgrade (cbgd::default line 16)
DEBUG: package[myserver] checking rpm status
DEBUG: package[myserver] checking install state
DEBUG: package[myserver] current version is 12.4.0-16050
DEBUG: package[myserver] no candidate version - nothing to do
INFO: Chef Run complete in 2.621177 seconds
我期待升級經歷。一個簡單的rpm -Uvh工作正常。有任何想法嗎?
非常感謝。我是廚師新手。你能否也請幫我介紹如何引入一個屬性代替源文件名?我想設置一個屬性rpmfile =輸出ls -1tr/tmp/myserver * | head -n 1 – ottodidakt
在適當的級別設置屬性node ['myserver_location'] ='ls -1tr/tmp/myserver * | head -n 1 -'然後在提供程序中,它將源設置爲源節點['myserver_location'] – PatrickWalker
要明確地在配方中將其明確設置爲節點屬性,可以通過多種方式設置屬性這個頁面會給更多的信息http://wiki.opscode.com/display/chef/Attributes – PatrickWalker