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

Commit

Permalink
fix modules definition and add README section about this feature (#232)
Browse files Browse the repository at this point in the history
  • Loading branch information
q2digger authored and jdauphant committed Oct 17, 2018
1 parent a6aa5ed commit 6863343
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,17 @@ nginx_set_real_ip_from_cloudflare: True
nginx_amplify: true
nginx_amplify_api_key: "your_api_key_goes_here"
nginx_amplify_update_agent: true

# Define modules (only for RHEL & CentOS).
# available modules:.
# - mod-http-geoip
# - mod-http-image-filter
# - mod-http-perl
# - mod-http-xslt-filter
# - mod-mail
# - mod-stream
nginx_module_configs:
- mod-http-geoip
```
Examples
Expand Down
11 changes: 2 additions & 9 deletions tasks/configuration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,21 +59,14 @@
- reload nginx
when: nginx_stream_params or nginx_stream_configs

- name: Create configuration for modules
template:
src: module.conf.j2
dest: "{{ nginx_conf_dir }}/modules-available/{{ item }}.conf"
loop: "{{ nginx_module_configs }}"
notify:
- reload nginx

- name: Create links for modules-enabled
file:
state: link
src: "{{ nginx_conf_dir }}/modules-available/{{ item }}.conf"
src: "/urs/share/nginx/modules/{{ item }}.conf"
dest: "{{ nginx_conf_dir }}/modules-enabled/{{ item }}.conf"
with_items: "{{ nginx_module_configs }}"
when: (item not in nginx_remove_modules) and (item not in nginx_disabled_modules)
ignore_errors: "{{ ansible_check_mode }}"
notify:
- reload nginx
when: ansible_distribution == 'CentOS' or ansible_distribution == 'Red Hat Enterprise Linux'

0 comments on commit 6863343

Please sign in to comment.