Search code examples
deploymentnginxchef-infracookbookberkshelf

Nginx cookbook v 2.0.0: Cookbook http_gzip_static_module not found


I'm using berkshelf to manage cookbooks, chef 11.6.2, and nginx cookbook v 2.0.0

my settings to compile nginx from source:

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

The provisioning gives me the error:

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

Is it a bug from nginx cookbook and how do you solve it? Everything works well with nginx cookbook v 1.7.0

Many thanks.


Solution

  • The nginx cookbook version was increased to 2.0.0 to make an emphasis on breaking changes. Particularly now you should specify all modules with nginx:: prefix and do not use extra_modules at all. So, it should look like this now:

    "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"]
            }
        }
    }
    

    Please look at this ticket and relevant changeset for details.