ANXS / nginx

A fairly flexible and feature full Ansible role for the NGINX web server.
MIT License
151 stars 82 forks source link

change how modules are enabled #39

Open otakup0pe opened 9 years ago

otakup0pe commented 9 years ago

Currently we enable extra modules by specifying the full string that is passed to configure. It would be much cleaner to specify them by a simple bool. As part of this we also may wish to revisit which modules are enabled by default.

Compare the two following YAML snippets.

nginx_source_modules_included:
  http_stub_status_module: "--with-http_stub_status_module"

nginx_source_modules_included:
  http_stub_status_module: yes
soupdiver commented 9 years ago

Good idea! :+1: I also felt the current way isn't optimal but so far didn't thought about it much further.

AgDude commented 9 years ago

For modules which are part of the nginx source, what about including them with a simple list. Lots of the modules listed in the docs http://nginx.org/en/docs/ are not included by default.

nginx_source_modules:
  - http_stub_status_module
  - ngx_http_perl_module

Any of these modules are included by prepending the module name with --with- as a build option.

soupdiver commented 9 years ago

With the idea from @AgDude we could avoid to have an extra mapping from the bool values @otakup0pe suggested. Like this idea