Skip to content

Commit 9f34575

Browse files
authored
Merge pull request #49 from nginxinc/(bug)/fix-modules
Refactor and fix module installation
2 parents a563c8e + 3a82651 commit 9f34575

File tree

3 files changed

+25
-22
lines changed

3 files changed

+25
-22
lines changed

tasks/main.yml

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -14,26 +14,8 @@
1414
- import_tasks: plus/install-plus.yml
1515
when: type == "plus"
1616

17-
- import_tasks: modules/install-njs.yml
18-
when: modules.njs
19-
20-
- import_tasks: modules/install-perl.yml
21-
when: modules.perl
22-
23-
- import_tasks: modules/install-geoip.yml
24-
when: modules.geoip
25-
26-
- import_tasks: modules/install-image-filter.yml
27-
when: modules.image_filter
28-
29-
- import_tasks: modules/install-rtmp.yml
30-
when: modules.rtmp
31-
32-
- import_tasks: modules/install-xslt.yml
33-
when: modules.xslt
34-
35-
- import_tasks: modules/install-waf.yml
36-
when: modules.waf and type == "plus"
17+
- import_tasks: modules/install-modules.yml
18+
when: true in modules.values()
3719

3820
- import_tasks: conf/push-config.yml
3921
when: main_push_enable or http_push_enable or stream_push_enable

tasks/modules/install-geoip.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
---
22
- name: "(Install: All OSs) Install NGINX Open Source GeoIP Module"
33
package:
4-
name: nginx-geoip-perl
4+
name: nginx-module-geoip
55
state: present
66
when: type == "opensource"
77

88
- name: "(Install: All OSs) Install NGINX Plus GeoIP Module"
99
package:
10-
name: nginx-plus-geoip-perl
10+
name: nginx-plus-module-geoip
1111
state: present
1212
when: type == "plus"
1313

tasks/modules/install-modules.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
- import_tasks: install-njs.yml
3+
when: modules.njs | default(false)
4+
5+
- import_tasks: install-perl.yml
6+
when: modules.perl | default(false)
7+
8+
- import_tasks: install-geoip.yml
9+
when: modules.geoip | default(false)
10+
11+
- import_tasks: install-image-filter.yml
12+
when: modules.image_filter | default(false)
13+
14+
- import_tasks: install-rtmp.yml
15+
when: modules.rtmp | default(false)
16+
17+
- import_tasks: install-xslt.yml
18+
when: modules.xslt | default(false)
19+
20+
- import_tasks: install-waf.yml
21+
when: modules.waf | default(false) and type == "plus"

0 commit comments

Comments
 (0)