Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update from upstream #1

Merged
merged 12 commits into from
Jan 18, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix modules definition and add README section about this feature (jda…
  • Loading branch information
q2digger authored and jdauphant committed Oct 17, 2018
commit 68633437e49f0e740f4dcae7754e025755ab89c2
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'