【问题标题】:Understanding Chef's run_list, particularly 'recipe[COOKBOOK]'了解 Chef 的 run_list,尤其是“recipe[COOKBOOK]”
【发布时间】:2020-01-28 16:05:52
【问题描述】:

我已经阅读了 Chef 网站上的 run_list 手册,但找不到我的答案...

我有一本名为“早餐”的食谱

我有一个角色配置文件,它将运行列表定义为:

"run_list": [
    "recipe[breakfast::egg]",
    "recipe[breakfast::bread]",
    "recipe[breakfast]"
]

根据上述情况,我知道食谱“egg.rb”和“bread.rb”是从 /cookbooks/breakfast/recipes/ 运行的

我的问题是,对于运行列表定义“recipe[breakfast]”中的第三个食谱,究竟运行的是什么?是 /cookbooks/breakfast/recipes/default.rb 吗?

先谢谢了!~

【问题讨论】:

    标签: jenkins chef-infra chef-recipe


    【解决方案1】:

    是的,如果只指定了食谱名称而没有指定食谱名称,则表示运行default 食谱。不仅在 run_list 中如此,当您在另一个类似的配方中包含 1 个配方时也是如此:

    include_recipe 'breakfast' # will run breakfast::default recipe
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-04-14
      • 2015-12-30
      • 1970-01-01
      相关资源
      最近更新 更多