Add support for all first party NGINX modules
This commit is contained in:
parent
57cb9d69e8
commit
5771c1e8a4
@ -7,12 +7,16 @@ type: opensource
|
||||
# Options are 'mainline' or 'stable'.
|
||||
# Default is stable.
|
||||
branch: mainline
|
||||
# Install nginscript, perl and/or waf modules.
|
||||
# Install nginscript, perl, waf, geoip, image-filter, rtmp and/or xslt modules.
|
||||
# Default is false.
|
||||
modules:
|
||||
njs: false
|
||||
perl: false
|
||||
waf: false
|
||||
geoip: false
|
||||
image-filter: false
|
||||
rtmp: false
|
||||
xslt: false
|
||||
# Install NGINX Amplify.
|
||||
# Use your NGINX Amplify API key.
|
||||
# Default is null.
|
||||
|
@ -17,6 +17,18 @@
|
||||
- import_tasks: modules/install-perl.yml
|
||||
when: modules.perl
|
||||
|
||||
- import_tasks: modules/install-geoip.yml
|
||||
when: modules.geoip
|
||||
|
||||
- import_tasks: modules/install-image-filter.yml
|
||||
when: modules.image-filter
|
||||
|
||||
- import_tasks: modules/install-rtmp.yml
|
||||
when: modules.rtmp
|
||||
|
||||
- import_tasks: modules/install-xslt.yml
|
||||
when: modules.xslt
|
||||
|
||||
- import_tasks: modules/install-waf.yml
|
||||
when: modules.waf and type == "plus"
|
||||
|
||||
|
21
tasks/modules/install-geoip.yml
Normal file
21
tasks/modules/install-geoip.yml
Normal file
@ -0,0 +1,21 @@
|
||||
---
|
||||
- name: "(Install: All OSs) Install Open Source NGINX GeoIP Module"
|
||||
package:
|
||||
name: nginx-geoip-perl
|
||||
state: present
|
||||
when: type == "opensource"
|
||||
|
||||
- name: "(Install: All OSs) Install NGINX Plus GeoIP Module"
|
||||
package:
|
||||
name: nginx-plus-geoip-perl
|
||||
state: present
|
||||
when: type == "plus"
|
||||
|
||||
- name: "(Setup: All NGINX) Load NGINX GeoIP Module"
|
||||
blockinfile:
|
||||
path: /etc/nginx/nginx.conf
|
||||
insertbefore: BOF
|
||||
block: |
|
||||
load_module modules/ngx_http_geoip_module.so;
|
||||
load_module modules/ngx_stream_geoip_module.so;
|
||||
notify: "(Handler: All OSs) Reload NGINX"
|
19
tasks/modules/install-image-filter.yml
Normal file
19
tasks/modules/install-image-filter.yml
Normal file
@ -0,0 +1,19 @@
|
||||
---
|
||||
- name: "(Install: All OSs) Install Open Source NGINX Image Filter Module"
|
||||
package:
|
||||
name: nginx-module-image-filter
|
||||
state: present
|
||||
when: type == "opensource"
|
||||
|
||||
- name: "(Install: All OSs) Install NGINX Plus Image Filter Module"
|
||||
package:
|
||||
name: nginx-plus-module-image-filter
|
||||
state: present
|
||||
when: type == "plus"
|
||||
|
||||
- name: "(Setup: All NGINX) Load NGINX Image Filter Module"
|
||||
lineinfile:
|
||||
path: /etc/nginx/nginx.conf
|
||||
insertbefore: BOF
|
||||
line: load_module modules/ngx_http_image_filter_module.so;
|
||||
notify: "(Handler: All OSs) Reload NGINX"
|
@ -1,11 +1,11 @@
|
||||
---
|
||||
- name: "(Install: All OSs) Install NGINX NJS Module"
|
||||
- name: "(Install: All OSs) Install Open Source NGINX NJS Module"
|
||||
package:
|
||||
name: nginx-module-njs
|
||||
state: present
|
||||
when: type == "opensource"
|
||||
|
||||
- name: "(Install: All OSs) Install NGINX NJS Module"
|
||||
- name: "(Install: All OSs) Install NGINX Plus NJS Module"
|
||||
package:
|
||||
name: nginx-plus-module-njs
|
||||
state: present
|
||||
|
@ -1,11 +1,11 @@
|
||||
---
|
||||
- name: "(Install: All OSs) Install NGINX Perl Module"
|
||||
- name: "(Install: All OSs) Install Open Source NGINX Perl Module"
|
||||
package:
|
||||
name: nginx-module-perl
|
||||
state: present
|
||||
when: type == "opensource"
|
||||
|
||||
- name: "(Install: All OSs) Install NGINX Perl Module"
|
||||
- name: "(Install: All OSs) Install NGINX Plus Perl Module"
|
||||
package:
|
||||
name: nginx-plus-module-perl
|
||||
state: present
|
||||
|
19
tasks/modules/install-rtmp.yml
Normal file
19
tasks/modules/install-rtmp.yml
Normal file
@ -0,0 +1,19 @@
|
||||
---
|
||||
- name: "(Install: All OSs) Install Open Source NGINX RTMP Module"
|
||||
package:
|
||||
name: nginx-module-rtmp
|
||||
state: present
|
||||
when: type == "opensource"
|
||||
|
||||
- name: "(Install: All OSs) Install NGINX Plus RTMP Module"
|
||||
package:
|
||||
name: nginx-plus-module-rtmp
|
||||
state: present
|
||||
when: type == "plus"
|
||||
|
||||
- name: "(Setup: All NGINX) Load NGINX RTMP Module"
|
||||
lineinfile:
|
||||
path: /etc/nginx/nginx.conf
|
||||
insertbefore: BOF
|
||||
line: load_module modules/ngx_rtmp_module.so;
|
||||
notify: "(Handler: All OSs) Reload NGINX"
|
19
tasks/modules/install-xslt.yml
Normal file
19
tasks/modules/install-xslt.yml
Normal file
@ -0,0 +1,19 @@
|
||||
---
|
||||
- name: "(Install: All OSs) Install Open Source NGINX XSLT Module"
|
||||
package:
|
||||
name: nginx-module-xslt
|
||||
state: present
|
||||
when: type == "opensource"
|
||||
|
||||
- name: "(Install: All OSs) Install NGINX Plus XSLT Module"
|
||||
package:
|
||||
name: nginx-plus-module-xslt
|
||||
state: present
|
||||
when: type == "plus"
|
||||
|
||||
- name: "(Setup: All NGINX) Load NGINX XSLT Module"
|
||||
lineinfile:
|
||||
path: /etc/nginx/nginx.conf
|
||||
insertbefore: BOF
|
||||
line: load_module modules/ngx_http_xslt_filter_module.so;
|
||||
notify: "(Handler: All OSs) Reload NGINX"
|
Loading…
Reference in New Issue
Block a user