ruby - 是否可以在不运行默认 Recipe 的情况下运行 Chef Recipe

标签 ruby admin chef-infra

我的 nginx Recipe 中有两个 Chef Recipe 。一个名为 default.rb,另一个名为 sites.rb。当我用

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

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

最佳答案

删除行

include_recipe "nginx"

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

关于ruby - 是否可以在不运行默认 Recipe 的情况下运行 Chef Recipe ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9213640/

相关文章:

sql - 很多外键 - Django Admin

chef-infra - 重启后无法访问 chef-manage web 界面 - CentOS 6

ruby - 我如何通知 Chef 执行需要参数的资源

windows - Knife 窗 : Network Error: getaddrinfo: Name or service not known (windows:22)

ruby-on-rails - ruby rails : How to check if the Model Exists

ruby - block 局部变量的语法

ruby - 如何读取一个文件的内容,然后将内容拆分成几个文件?

ruby - 使用 ruby​​ 将存储为有符号的无符号整数转换回原始值

css - django 将背景图片添加到管理站点

python - 对象没有属性 '__getitem__'