Skip to content

Commit e05cd4c

Browse files
authored
Update supported NGINX Plus dynamic modules (#575)
1 parent 72d4475 commit e05cd4c

File tree

5 files changed

+25
-31
lines changed

5 files changed

+25
-31
lines changed

CHANGELOG.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@ BREAKING CHANGES:
2020

2121
FEATURES:
2222

23-
* Add AlmaLinux, Oracle Linux and Rocky Linux to the list of NGINX OSS and NGINX Plus tested and supported platforms.
24-
* Add Alpine Linux 3.17 to the NGINX list of tested and supported platforms (and remove Alpine Linux 3.13 from the list of NGINX OSS supported platforms).
23+
* Add support for the newer `ndk` and `set-misc` NGINX Plus dynamic modules and remove old code checks for distributions that are no longer supported.
24+
* Add AlmaLinux, Oracle Linux and Rocky Linux to the list of NGINX OSS and NGINX Plus tested and supported distributions.
25+
* Add Alpine Linux 3.17 to the NGINX list of tested and supported platforms (and remove Alpine Linux 3.13 from the list of NGINX OSS supported distributions).
2526

2627
ENHANCEMENTS:
2728

defaults/main/main.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -111,14 +111,16 @@ nginx_modules: []
111111
# - headers-more # NGINX Plus
112112
# - image-filter
113113
# - lua # NGINX Plus
114+
# - ndk # NGINX Plus
114115
# - name: njs # Required
115116
# state: present # Optional
116117
# version: =1.19.4+0.4.4-1~bionic # Optional
117118
# - opentracing # NGINX Plus
118119
# - passenger # NGINX Plus
119-
# - perl # NGINX Plus
120+
# - perl
120121
# - prometheus # NGINX Plus
121-
# - rtmp
122+
# - rtmp # NGINX Plus
123+
# - set-misc # NGINX Plus
122124
# - subs-filter # NGINX Plus
123125
# - waf # NGINX Plus
124126
# - xslt

molecule/plus/converge.yml

+1
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,6 @@
2626
- perl
2727
- prometheus
2828
- rtmp
29+
- set-misc
2930
- subs-filter
3031
- xslt

tasks/modules/install-modules.yml

+16-26
Original file line numberDiff line numberDiff line change
@@ -7,37 +7,36 @@
77
- '"geoip" in nginx_modules'
88
- nginx_install_epel_release | bool
99

10-
- name: (RHEL 7) Install GeoIP2 dependency
10+
- name: (Amazon Linux 2/RHEL 7) Install GeoIP2 dependency
1111
when:
12-
- ansible_facts['distribution'] == "RedHat"
13-
- ansible_facts['distribution_major_version'] is version('7', '==')
12+
- (ansible_facts['distribution'] == "RedHat" and ansible_facts['distribution_major_version'] is version('7', '=='))
13+
or ansible_facts['distribution'] == "Amazon"
1414
- '"geoip2" in nginx_modules'
1515
block:
16-
- name: (RHEL 7) Check if libmaxminddb is available
16+
- name: (Amazon Linux 2/RHEL 7) Check if libmaxminddb is available
1717
ansible.builtin.yum:
1818
list: available
1919
register: packages
2020

21-
- name: (RHEL 7) Install libmaxminddb
21+
- name: (Amazon Linux 2/RHEL 7) Install libmaxminddb
2222
ansible.builtin.yum:
2323
name: https://rpmfind.net/linux/centos/7.9.2009/os/x86_64/Packages/libmaxminddb-1.2.0-6.el7.x86_64.rpm
2424
when: '"libmaxminddb" not in packages.results'
2525

26-
- name: (AlmaLinux/Oracle Linux/RHEL) Install GeoIP2 and/or OpenTracing EPEL dependency
26+
- name: (AlmaLinux/Amazon Linux 2/Oracle Linux/RHEL/Rocky Linux) Install GeoIP2 and/or OpenTracing EPEL dependency
2727
when:
28-
- ansible_facts['os_family'] == "RedHat" and ansible_facts['distribution'] != "Amazon"
29-
- (ansible_facts['distribution_major_version'] is version('7', '==') and '"geoip2" in nginx_modules')
30-
or '"opentracing" in nginx_modules'
28+
- ansible_facts['os_family'] == "RedHat"
29+
- ('"opentracing" in nginx_modules')
3130
- nginx_install_epel_release | bool
3231
block:
33-
- name: (RHEL) Import EPEL GPG key
32+
- name: (AlmaLinux/Amazon Linux 2/Oracle Linux/RHEL/Rocky Linux) Import EPEL GPG key
3433
ansible.builtin.rpm_key:
3534
state: present
36-
key: https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-{{ ansible_facts['distribution_major_version'] }}
35+
key: https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-{{ ((ansible_facts['distribution'] == 'Amazon') | ternary('7', ansible_facts['distribution_major_version'])) }}
3736

38-
- name: (RHEL) Install EPEL
37+
- name: (AlmaLinux/Amazon Linux 2/Oracle Linux/RHEL/Rocky Linux) Install EPEL
3938
ansible.builtin.yum:
40-
name: https://dl.fedoraproject.org/pub/epel/epel-release-latest-{{ ansible_facts['distribution_major_version'] }}.noarch.rpm
39+
name: https://dl.fedoraproject.org/pub/epel/epel-release-latest-{{ ((ansible_facts['distribution'] == 'Amazon') | ternary('7', ansible_facts['distribution_major_version'])) }}.noarch.rpm
4140

4241
- name: (Alpine Linux) Install Lua and Encrypted Sessions Alpine Linux 3.17 dependency
4342
community.general.apk:
@@ -46,7 +45,7 @@
4645
- nginx_type == 'plus'
4746
- ansible_facts['os_family'] == "Alpine"
4847
- ansible_facts['distribution_version'] | regex_search('^[0-9]+\\.[0-9]+') is version('3.17', '==')
49-
- ('"lua" in nginx_modules') or ('"encrypted-sessions" in nginx_modules')
48+
- ('"encrypted-sessions" in nginx_modules') or ('"lua" in nginx_modules') or ('"set-misc" in nginx_modules')
5049

5150
- name: Setup NGINX modules
5251
ansible.builtin.package:
@@ -57,21 +56,12 @@
5756
when:
5857
- (item.name | default(item) in nginx_modules_list and nginx_type == 'opensource')
5958
or (item.name | default(item) in nginx_plus_modules_list and nginx_type == 'plus')
60-
- not (item.name | default(item) == "auth-spnego")
61-
or not (ansible_facts['os_family'] == "Alpine" and (ansible_facts['distribution_version'] | regex_search('^[0-9]+\\.[0-9]+') is version('3.8', '==')))
6259
- not (item.name | default(item) == "brotli")
63-
or not ((ansible_facts['os_family'] == "Alpine")
64-
or (ansible_facts['distribution'] == "Amazon")
65-
or (ansible_facts['os_family'] == "Debian" and ansible_facts['distribution_major_version'] is version('9', '=='))
66-
or (ansible_facts['distribution'] == "OracleLinux")
67-
or (ansible_facts['os_family'] == "RedHat" and ansible_facts['distribution_major_version'] is version('8', '<'))
68-
or (ansible_facts['os_family'] == "Suse" and ansible_facts['distribution_major_version'] is version('12', '<')))
60+
or not (ansible_facts['os_family'] == "Suse" and ansible_facts['distribution_major_version'] is version('12', '=='))
6961
- not (item.name | default(item) == "geoip")
7062
or not ((ansible_facts['os_family'] == "FreeBSD")
7163
or (ansible_facts['os_family'] == "RedHat" and ansible_facts['distribution_major_version'] is version('8', '>=')))
7264
- not (item.name | default(item) == "geoip2")
73-
or not ((ansible_facts['distribution'] == 'Amazon')
74-
or (ansible_facts['os_family'] == "Suse"))
65+
or not (ansible_facts['os_family'] == "Suse")
7566
- not (item.name | default(item) == "opentracing")
76-
or not ((ansible_facts['distribution'] == 'Amazon')
77-
or (ansible_facts['os_family'] == "Suse" and ansible_facts['distribution_major_version'] is version('12', '==')))
67+
or not (ansible_facts['os_family'] == "Suse" and ansible_facts['distribution_major_version'] is version('12', '=='))

vars/main.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,5 +86,5 @@ nginx_modules_list: [
8686
# Supported NGINX Plus dynamic modules
8787
nginx_plus_modules_list: [
8888
auth-spnego, brotli, encrypted-session, geoip, geoip2, headers-more, image-filter,
89-
lua, njs, opentracing, passenger, perl, prometheus, rtmp, subs-filter, xslt,
89+
lua, ndk, njs, opentracing, passenger, perl, prometheus, rtmp, set-misc, subs-filter, xslt,
9090
]

0 commit comments

Comments
 (0)