lwrp

    -1熱度

    1回答

    我想擴展'包'資源並將其作爲LWRP - cookbookname_package提供,以便從其他食譜中調用。 是否有必要手動重寫從package resource到cookbookname/resources/package.rb的所有屬性? 有沒有辦法簡單地從廚師的源代碼現有的或只有方式作爲翻譯和維護所有這些? allow_downgrade TrueClass, FalseClass #

    1熱度

    1回答

    我試圖使用廚師LWRP下的目錄資源,但無法訪問資源塊內的屬性,有沒有辦法做到這一點。 還是我完全錯了,需要不同的方法來實現這一點。 my-cookbook/providers/default.rb use_inline_resources action :setup do directory node["#{@new_resource.name}"] do action :

    2熱度

    1回答

    在我的自定義廚師食譜(位於https://github.com/sanguis/chef-omeka/tree/lwrp)。 我正在從自定義solo.rb配方調用的自定義資源(LWRP)中調用Apache2資源web_app。 include_recipe 'apache2' web_app url do server_name url server_aliases alia

    1熱度

    2回答

    我定義如下供應商: action :start do ... end action :stop do ... end action :restart do ... end 現在,而不是重寫的restartstop和start實施,我想打電話給action :stop,然後在action :startaction :restart,像這樣: action :restart d

    0熱度

    2回答

    鑑於小例子 # resources/novowel.rb resource_name :novowel property :name, String, name_property: true, regex: /\A[^aeiou]\z/ 我想編寫單元測試中spec/unit/resources/novowel_spec.rb 資源「novowel」的名稱應該接受「K」 資源「novowel

    0熱度

    1回答

    我需要能夠發送REST調用並將返回的有效負載保存到食譜內的變量(使用廚師獨奏)。 呼叫在HTTPS建立 需要能夠得到的順序返回cookie頭登錄到API 是否有這樣的社區LWRP可用?我不知道廚師的任何內置功能是否允許這樣做。 (從我讀過的廚師的http_request提供者中沒有回答上述標準)

    0熱度

    1回答

    如果有人能向我解釋爲什麼我有一個自定義LWRP的特定問題,我已經創建了一段時間,我真的很感激。 大廚12.3.0,我的自定義屬性LWRP完全正常工作這樣定義的: attribute 'name', 'kind_of' => String, 'name_attribute' => true attribute 'older_than', 'kind_of' => Integer, 'de

    2熱度

    1回答

    我有一個廚師資源的以下屬性: attribute :attribName, kind_of: String, name_attribute: true, default: 'big string sldkjslkdflksdksdlkff' 我想打破這件事,所以它看起來不錯,所以我這樣做: attribute [ :attribName, kind_of: String,

    0熱度

    1回答

    我有一本食譜,其中包含LWRP和「文件」文件夾中的一些文件。 cookbook_file put_it_here do source myfile end 在另一個食譜配方調用該資源將看在自己的食譜的「文件」目錄,在資源所在的菜譜不是文件。 我嘗試過使用cookbook_name,但仍然解決了調用資源的配方,所以下面的代碼不起作用。 cookbook_file put_it_her

    0熱度

    1回答

    我看johnbellone/consul-cookbook在github上,我看到以下內容: install = consul_installation node['consul']['version'] do |r| if node['consul']['installation'] node['consul']['installation'].each_pair { |k, v|