【问题标题】:Is it possible to run a chef recipe without running the default recipe是否可以在不运行默认食谱的情况下运行厨师食谱
【发布时间】:2012-02-10 01:37:33
【问题描述】:

我的 nginx 食谱中有两个厨师食谱。一个名为 default.rb,另一个名为 sites.rb。当我使用

运行网站配方时
RUN_LIST=recipe[nginx::sites] bundle exec cap staging chef:solo

然后我的默认配方也会运行。如何防止这种情况发生?

【问题讨论】:

  • 您的sites.rb 是否包含include_recipe "default" 行?
  • 我有一个include_recipe "nginx"。不确定它指的是什么配方,因为我没有名为 nginx 的配方文件。
  • Recipe nginx 是recipe nginx::default 的简写,位于$COOKBOOKS/nginx/recipes/default.rb

标签: ruby admin chef-infra


【解决方案1】:

删除线

include_recipe "nginx"

因为它包含默认配方 (nginx::default)

【讨论】:

    猜你喜欢
    • 2020-09-04
    • 2017-04-27
    • 1970-01-01
    • 1970-01-01
    • 2013-08-21
    • 1970-01-01
    • 1970-01-01
    • 2021-11-01
    • 1970-01-01
    相关资源
    最近更新 更多