Skip to content
This repository was archived by the owner on Aug 13, 2024. It is now read-only.

Commit 6863343

Browse files
q2diggerjdauphant
authored andcommitted
fix modules definition and add README section about this feature (#232)
1 parent a6aa5ed commit 6863343

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

README.md

+11
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,17 @@ nginx_set_real_ip_from_cloudflare: True
103103
nginx_amplify: true
104104
nginx_amplify_api_key: "your_api_key_goes_here"
105105
nginx_amplify_update_agent: true
106+
107+
# Define modules (only for RHEL & CentOS).
108+
# available modules:.
109+
# - mod-http-geoip
110+
# - mod-http-image-filter
111+
# - mod-http-perl
112+
# - mod-http-xslt-filter
113+
# - mod-mail
114+
# - mod-stream
115+
nginx_module_configs:
116+
- mod-http-geoip
106117
```
107118
108119
Examples

tasks/configuration.yml

+2-9
Original file line numberDiff line numberDiff line change
@@ -59,21 +59,14 @@
5959
- reload nginx
6060
when: nginx_stream_params or nginx_stream_configs
6161

62-
- name: Create configuration for modules
63-
template:
64-
src: module.conf.j2
65-
dest: "{{ nginx_conf_dir }}/modules-available/{{ item }}.conf"
66-
loop: "{{ nginx_module_configs }}"
67-
notify:
68-
- reload nginx
69-
7062
- name: Create links for modules-enabled
7163
file:
7264
state: link
73-
src: "{{ nginx_conf_dir }}/modules-available/{{ item }}.conf"
65+
src: "/urs/share/nginx/modules/{{ item }}.conf"
7466
dest: "{{ nginx_conf_dir }}/modules-enabled/{{ item }}.conf"
7567
with_items: "{{ nginx_module_configs }}"
7668
when: (item not in nginx_remove_modules) and (item not in nginx_disabled_modules)
7769
ignore_errors: "{{ ansible_check_mode }}"
7870
notify:
7971
- reload nginx
72+
when: ansible_distribution == 'CentOS' or ansible_distribution == 'Red Hat Enterprise Linux'

0 commit comments

Comments
 (0)