Nginx cookbook v 2.0.0:未找到Cookbook http_gzip_static_module

时间:2013-10-22 15:44:40

标签: deployment nginx chef cookbook berkshelf

我正在使用berkshelf管理食谱,厨师11.6.2和nginx cookbook v 2.0.0

我从源代码编译nginx的设置:

set[:nginx][:source][:modules] = ["http_gzip_static_module", "http_ssl_module"]

配置给了我错误:

Cookbook http_gzip_static_module not found. If you're loading http_gzip_static_module from another cookbook, make sure you configure the dependency in your metadata

这是来自nginx cookbook的错误,你如何解决它?一切都适用于nginx cookbook v 1.7.0

非常感谢。

1 个答案:

答案 0 :(得分:16)

nginx cookbook版本增加到2.0.0,以强调破坏变化。特别是现在您应该使用 nginx :: 前缀指定所有模块,并且根本不使用 extra_modules 。所以,它现在看起来应该是这样的:

"default_attributes": {
    "nginx": {
      "source": {
        "modules": [
          "nginx::http_gzip_static_module", "nginx::http_ssl_module",
          "nginx::http_realip_module", "nginx::http_stub_status_module",
          "nginx::upload_progress_module"]
        }
    }
}

有关详细信息,请查看此ticket及相关changeset

相关问题