Load module from {{nginx_dir}}/etc/modules-enabled
parent
ae167d3317
commit
7892626fc0
|
@ -55,6 +55,11 @@ FreeBSD:
|
||||||
- `nginx_custom_http`: instructions list (will put data in `/etc/nginx/conf.d/custom.conf`)
|
- `nginx_custom_http`: instructions list (will put data in `/etc/nginx/conf.d/custom.conf`)
|
||||||
- `nginx_dyn_modules`: dynamic module list to load
|
- `nginx_dyn_modules`: dynamic module list to load
|
||||||
|
|
||||||
|
About modules
|
||||||
|
-------------
|
||||||
|
|
||||||
|
Last updates from Debian backports loads modules from /etc/nginx/modules-enabled directory. Disabling/Enabling is not supported anymore. Please wait further update.
|
||||||
|
|
||||||
Fine configuration
|
Fine configuration
|
||||||
------------------
|
------------------
|
||||||
|
|
||||||
|
|
|
@ -13,4 +13,13 @@
|
||||||
with_items: "{{ nginx_dyn_modules }}"
|
with_items: "{{ nginx_dyn_modules }}"
|
||||||
when: ansible_distribution == 'Debian'
|
when: ansible_distribution == 'Debian'
|
||||||
|
|
||||||
|
- name: FILE | Creates modules directories
|
||||||
|
file: >
|
||||||
|
path="{{ nginx_etc_dir}}/{{ item }}"
|
||||||
|
state=directory
|
||||||
|
mode=0755
|
||||||
|
owner=root
|
||||||
|
group=root
|
||||||
|
with_items: ['modules-available', 'modules-enabled']
|
||||||
|
|
||||||
# TODO: manage freebsd
|
# TODO: manage freebsd
|
||||||
|
|
|
@ -6,9 +6,7 @@ user {{ nginx_user }};
|
||||||
worker_processes {{ nginx_worker_processes }};
|
worker_processes {{ nginx_worker_processes }};
|
||||||
pid {{ nginx_pid }};
|
pid {{ nginx_pid }};
|
||||||
{% if nginx_version.stdout | version_compare('1.9.11', 'ge') %}
|
{% if nginx_version.stdout | version_compare('1.9.11', 'ge') %}
|
||||||
{% for module in nginx_dyn_modules -%}
|
include {{ nginx_etc_dir }}/modules-enabled/*;
|
||||||
load_module "modules/ngx_{{ module }}_module.so";
|
|
||||||
{% endfor %}
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
events {
|
events {
|
||||||
|
|
Loading…
Reference in New Issue