Skip to content

Commit 3f53dcb

Browse files
committed
feat!: Add support for NGINX Plus R33 and the new JWT license (#814)
1 parent 49157d4 commit 3f53dcb

33 files changed

+321
-176
lines changed

Diff for: .github/workflows/molecule.yml

+1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ jobs:
4444
AMPLIFY_PASSWORD: ${{ secrets.AMPLIFY_PASSWORD }}
4545
NGINX_CRT: ${{ secrets.NGINX_CRT }}
4646
NGINX_KEY: ${{ secrets.NGINX_KEY }}
47+
NGINX_JWT: ${{ secrets.NGINX_JWT }}
4748
ONE_API_TOKEN: ${{ secrets.ONE_API_TOKEN }}
4849
ONE_TENANT: ${{ secrets.ONE_TENANT }}
4950
strategy:

Diff for: .gitignore

+20-4
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,41 @@
1-
# Any private crt and keys #
2-
############################
1+
########################
2+
# Any crt/keys/license #
3+
########################
34
*.crt
45
*.key
6+
*.jwt
7+
8+
##########################
9+
# Backup/temporary files #
10+
##########################
511
*~
612
\#*
713

8-
# OS Specific #
9-
###############
14+
##################
15+
# MacOS specific #
16+
##################
1017
Thumbs.db
1118
.DS_Store
1219
.vscode
1320

21+
########################
22+
# Code editor specific #
23+
########################
24+
.idea
25+
.vscode
26+
27+
####################
1428
# Ansible specific #
1529
####################
1630
.cache
1731
*.retry
1832

33+
###################
1934
# Python specific #
2035
###################
2136
__pycache__
2237

38+
########
2339
# Logs #
2440
########
2541
*.log

Diff for: CHANGELOG.md

+6-4
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,21 @@
44

55
BREAKING CHANGES:
66

7+
- NGINX Plus requires a JWT license starting with R33. Make sure you include the path to the base64 encoded JWT license using the new `nginx_license['jwt']` parameter.
78
- Remove support for RHEL 7 based distributions (RHEL/CentOS/Oracle Linux 7). CentOS 7 has reached EoL, RHEL 7 has reached EoM, and Oracle Linux 7 will reach EoL shortly. These distributions will not be supported by new NGINX releases moving forward. If you are still using one of these distributions, please consider upgrading. If you still want to use this role for the time being, please use the previous release (0.24.3). Do note that you will only be able to use NGINX versions released as of the date of the aforementioned release (July 11, 2024).
8-
- Remove support for installing NGINX Open Source on Alpine Linux 3.16.
9+
- Remove support for installing NGINX Open Source and NGINX Plus on Alpine Linux 3.16.
10+
- Remove support for installing NGINX Open Source on Ubuntu mantic.
911
- No longer omit `allow_downgrade` module parameter when running Ansible versions lower than `2.12`.
1012

1113
FEATURES:
1214

1315
- Add support for templating the entire NGINX Agent configuration file.
1416
- Add support for installing and configuring the NGINX Plus HA keepalived package.
1517
- Add validation tasks to check the Ansible version, the Jinja2 version, whether the required Ansible collections for this role are installed, and whether you are trying to install a valid NGINX module.
16-
- Add support for installing NGINX Open Source on Alpine Linux 3.20.
18+
- Add support for installing NGINX Open Source and NGINX Plus on Alpine Linux 3.20.
19+
- Add support for installing NGINX Open Source on Ubuntu oracular.
1720
- Add support for installing NGINX Agent on Ubuntu noble.
1821
- Bump the minimum version of Ansible supported to `2.16`, whilst clarifying that Ansible `2.18` is not supported at this stage.
19-
- Bump the Ansible `community.general` collection to `9.2.0`, `community.crypto` collection to `2.21.1` and `community.docker` collection to `3.11.0`.
2022

2123
DOCUMENTATION:
2224

@@ -34,7 +36,7 @@ MAINTENANCE:
3436

3537
CI/CD:
3638

37-
- Update GitHub Actions to Ubuntu 24.04.
39+
- Update GitHub Actions to Ubuntu 24.04 (noble).
3840
- Switch GitHub Actions from using tags to release hashes.
3941
- Remove commented out Molecule platforms and GitHub Actions QEMU step for the time being. These changes will be reverted if multi-arch testing can be reinstated in GitHub Actions.
4042
- Bump the minimum version of Ansible supported on Ansible Galaxy to `2.16`.

Diff for: defaults/main/main.yml

+6-1
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,16 @@ nginx_static_modules: [http_ssl_module]
7979
# Default is mainline.
8080
nginx_branch: mainline
8181

82-
# Location of your NGINX Plus license in your local machine.
82+
# Location of your NGINX Plus license (certificate, key, and JWT) in your local machine. The license JWT is only required starting with NGINX Plus R33 and later.
83+
# For the license JWT, you can optionally specify a custom destination path for the JWT by using the 'src' and 'dest' parameters.
8384
# Default is the files folder within the NGINX Ansible role.
8485
nginx_license:
8586
certificate: license/nginx-repo.crt
8687
key: license/nginx-repo.key
88+
jwt: license/license.jwt
89+
# jwt:
90+
# src: license/license.jwt
91+
# dest: /etc/nginx/license.jwt
8792

8893
# Set up NGINX Plus license before installation.
8994
# Default is true.

Diff for: molecule/agent/molecule.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ platforms:
9393
command: /usr/sbin/init
9494
- name: oraclelinux-9
9595
image: oraclelinux:9
96+
platform: x86_64
9697
dockerfile: ../common/Dockerfile.j2
9798
privileged: true
9899
cgroupns_mode: host
@@ -108,7 +109,7 @@ platforms:
108109
- /sys/fs/cgroup:/sys/fs/cgroup:rw
109110
command: /usr/sbin/init
110111
- name: rhel-9
111-
image: redhat/ubi9:9.4
112+
image: redhat/ubi9:9.5
112113
dockerfile: ../common/Dockerfile.j2
113114
privileged: true
114115
cgroupns_mode: host

Diff for: molecule/amplify/molecule.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ platforms:
2828
- /sys/fs/cgroup:/sys/fs/cgroup:rw
2929
command: /usr/sbin/init
3030
- name: rhel-9
31-
image: redhat/ubi9:9.4
31+
image: redhat/ubi9:9.5
3232
dockerfile: ../common/Dockerfile.j2
3333
privileged: true
3434
cgroupns_mode: host

Diff for: molecule/default/molecule.yml

+6-5
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ platforms:
9393
command: /usr/sbin/init
9494
- name: oraclelinux-9
9595
image: oraclelinux:9
96+
platform: x86_64
9697
dockerfile: ../common/Dockerfile.j2
9798
privileged: true
9899
cgroupns_mode: host
@@ -108,7 +109,7 @@ platforms:
108109
- /sys/fs/cgroup:/sys/fs/cgroup:rw
109110
command: /usr/sbin/init
110111
- name: rhel-9
111-
image: redhat/ubi9:9.4
112+
image: redhat/ubi9:9.5
112113
dockerfile: ../common/Dockerfile.j2
113114
privileged: true
114115
cgroupns_mode: host
@@ -156,16 +157,16 @@ platforms:
156157
volumes:
157158
- /sys/fs/cgroup:/sys/fs/cgroup:rw
158159
command: /sbin/init
159-
- name: ubuntu-mantic
160-
image: ubuntu:mantic
160+
- name: ubuntu-noble
161+
image: ubuntu:noble
161162
dockerfile: ../common/Dockerfile.j2
162163
privileged: true
163164
cgroupns_mode: host
164165
volumes:
165166
- /sys/fs/cgroup:/sys/fs/cgroup:rw
166167
command: /sbin/init
167-
- name: ubuntu-noble
168-
image: ubuntu:noble
168+
- name: ubuntu-oracular
169+
image: ubuntu:oracular
169170
dockerfile: ../common/Dockerfile.j2
170171
privileged: true
171172
cgroupns_mode: host

Diff for: molecule/distribution/molecule.yml

+6-5
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ platforms:
9393
command: /usr/sbin/init
9494
- name: oraclelinux-9
9595
image: oraclelinux:9
96+
platform: x86_64
9697
dockerfile: ../common/Dockerfile.j2
9798
privileged: true
9899
cgroupns_mode: host
@@ -108,7 +109,7 @@ platforms:
108109
- /sys/fs/cgroup:/sys/fs/cgroup:rw
109110
command: /usr/sbin/init
110111
- name: rhel-9
111-
image: redhat/ubi9:9.4
112+
image: redhat/ubi9:9.5
112113
dockerfile: ../common/Dockerfile.j2
113114
privileged: true
114115
cgroupns_mode: host
@@ -156,16 +157,16 @@ platforms:
156157
volumes:
157158
- /sys/fs/cgroup:/sys/fs/cgroup:rw
158159
command: /sbin/init
159-
- name: ubuntu-mantic
160-
image: ubuntu:mantic
160+
- name: ubuntu-noble
161+
image: ubuntu:noble
161162
dockerfile: ../common/Dockerfile.j2
162163
privileged: true
163164
cgroupns_mode: host
164165
volumes:
165166
- /sys/fs/cgroup:/sys/fs/cgroup:rw
166167
command: /sbin/init
167-
- name: ubuntu-noble
168-
image: ubuntu:noble
168+
- name: ubuntu-oracular
169+
image: ubuntu:oracular
169170
dockerfile: ../common/Dockerfile.j2
170171
privileged: true
171172
cgroupns_mode: host

Diff for: molecule/downgrade-plus/converge.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,22 @@
44
pre_tasks:
55
- name: Set repo if Alpine
66
ansible.builtin.set_fact:
7-
version: =31-r1
7+
version: =32-r1
88
cacheable: true
99
when: ansible_facts['os_family'] == "Alpine"
1010
- name: Set repo if Debian
1111
ansible.builtin.set_fact:
12-
version: =31-1~{{ ansible_facts['distribution_release'] }}
12+
version: =32-1~{{ ansible_facts['distribution_release'] }}
1313
cacheable: true
1414
when: ansible_facts['os_family'] == "Debian"
1515
- name: Set repo if Red Hat
1616
ansible.builtin.set_fact:
17-
version: -31-1.{{ (ansible_facts['distribution'] == "Amazon") | ternary(('amzn' + ansible_facts['distribution_major_version'] | string), ('el' + ansible_facts['distribution_major_version'] | string)) }}.ngx
17+
version: -32-1.{{ (ansible_facts['distribution'] == "Amazon") | ternary(('amzn' + ansible_facts['distribution_major_version'] | string), ('el' + ansible_facts['distribution_major_version'] | string)) }}.ngx
1818
cacheable: true
1919
when: ansible_facts['os_family'] == "RedHat"
2020
- name: Set repo if SLES
2121
ansible.builtin.set_fact:
22-
version: =31-1.sles{{ ansible_facts['distribution_major_version'] }}.ngx
22+
version: =32-1.sles{{ ansible_facts['distribution_major_version'] }}.ngx
2323
cacheable: true
2424
when: ansible_facts['os_family'] == "Suse"
2525
tasks:

Diff for: molecule/downgrade-plus/molecule.yml

+20-19
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
driver:
33
name: docker
4-
platforms: # Ubuntu noble only has one version of NGINX Plus available (at the moment) so it's impossible to test the downgrade scenario
4+
platforms: # Alpine Linux 3.20 only has one version of NGINX Plus available (at the moment) so it's impossible to test the downgrade scenario
55
- name: almalinux-8
66
image: almalinux:8
77
dockerfile: ../common/Dockerfile.j2
@@ -18,15 +18,6 @@ platforms: # Ubuntu noble only has one version of NGINX Plus available (at the m
1818
volumes:
1919
- /sys/fs/cgroup:/sys/fs/cgroup:rw
2020
command: /usr/sbin/init
21-
- name: alpine-3.16
22-
image: alpine:3.16
23-
platform: x86_64
24-
dockerfile: ../common/Dockerfile.j2
25-
privileged: true
26-
cgroupns_mode: host
27-
volumes:
28-
- /sys/fs/cgroup:/sys/fs/cgroup:rw
29-
command: /sbin/init
3021
- name: alpine-3.17
3122
image: alpine:3.17
3223
dockerfile: ../common/Dockerfile.j2
@@ -51,6 +42,15 @@ platforms: # Ubuntu noble only has one version of NGINX Plus available (at the m
5142
volumes:
5243
- /sys/fs/cgroup:/sys/fs/cgroup:rw
5344
command: /sbin/init
45+
# - name: alpine-3.20
46+
# image: alpine:3.20
47+
# platform: x86_64
48+
# dockerfile: ../common/Dockerfile.j2
49+
# privileged: true
50+
# cgroupns_mode: host
51+
# volumes:
52+
# - /sys/fs/cgroup:/sys/fs/cgroup:rw
53+
# command: /sbin/init
5454
- name: amazonlinux-2
5555
image: amazonlinux:2
5656
platform: x86_64
@@ -94,6 +94,7 @@ platforms: # Ubuntu noble only has one version of NGINX Plus available (at the m
9494
command: /usr/sbin/init
9595
- name: oraclelinux-9
9696
image: oraclelinux:9
97+
platform: x86_64
9798
dockerfile: ../common/Dockerfile.j2
9899
privileged: true
99100
cgroupns_mode: host
@@ -109,7 +110,7 @@ platforms: # Ubuntu noble only has one version of NGINX Plus available (at the m
109110
- /sys/fs/cgroup:/sys/fs/cgroup:rw
110111
command: /usr/sbin/init
111112
- name: rhel-9
112-
image: redhat/ubi9:9.4
113+
image: redhat/ubi9:9.5
113114
dockerfile: ../common/Dockerfile.j2
114115
privileged: true
115116
cgroupns_mode: host
@@ -157,14 +158,14 @@ platforms: # Ubuntu noble only has one version of NGINX Plus available (at the m
157158
volumes:
158159
- /sys/fs/cgroup:/sys/fs/cgroup:rw
159160
command: /sbin/init
160-
# - name: ubuntu-noble
161-
# image: ubuntu:noble
162-
# dockerfile: ../common/Dockerfile.j2
163-
# privileged: true
164-
# cgroupns_mode: host
165-
# volumes:
166-
# - /sys/fs/cgroup:/sys/fs/cgroup:rw
167-
# command: /sbin/init
161+
- name: ubuntu-noble
162+
image: ubuntu:noble
163+
dockerfile: ../common/Dockerfile.j2
164+
privileged: true
165+
cgroupns_mode: host
166+
volumes:
167+
- /sys/fs/cgroup:/sys/fs/cgroup:rw
168+
command: /sbin/init
168169
provisioner:
169170
name: ansible
170171
playbooks:

Diff for: molecule/downgrade-plus/prepare.yml

+8
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,13 @@
1717
force: false
1818
mode: "0444"
1919

20+
- name: Create ephemeral license JWT file from b64 encoded env var
21+
ansible.builtin.copy:
22+
content: "{{ lookup('env', 'NGINX_JWT') }}"
23+
dest: ../../files/license/license.jwt
24+
force: false
25+
mode: "0444"
26+
2027
- name: Prepare NGINX Plus
2128
hosts: all
2229
tasks:
@@ -28,3 +35,4 @@
2835
nginx_license:
2936
certificate: license/nginx-repo.crt
3037
key: license/nginx-repo.key
38+
jwt: license/license.jwt

Diff for: molecule/downgrade/converge.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,22 @@
44
pre_tasks:
55
- name: Set repo if Alpine
66
ansible.builtin.set_fact:
7-
version: =1.25.5-r1
7+
version: =1.27.1-r1
88
cacheable: true
99
when: ansible_facts['os_family'] == "Alpine"
1010
- name: Set repo if Debian
1111
ansible.builtin.set_fact:
12-
version: =1.25.5-1~{{ ansible_facts['distribution_release'] }}
12+
version: =1.27.1-1~{{ ansible_facts['distribution_release'] }}
1313
cacheable: true
1414
when: ansible_facts['os_family'] == "Debian"
1515
- name: Set repo if Red Hat
1616
ansible.builtin.set_fact:
17-
version: -1.25.5-1.{{ (ansible_facts['distribution'] == "Amazon") | ternary(('amzn' + ansible_facts['distribution_major_version'] | string), ('el' + ansible_facts['distribution_major_version'] | string)) }}.ngx
17+
version: -1.27.1-1.{{ (ansible_facts['distribution'] == "Amazon") | ternary(('amzn' + ansible_facts['distribution_major_version'] | string), ('el' + ansible_facts['distribution_major_version'] | string)) }}.ngx
1818
cacheable: true
1919
when: ansible_facts['os_family'] == "RedHat"
2020
- name: Set repo if SLES
2121
ansible.builtin.set_fact:
22-
version: =1.25.5-1.sles{{ ansible_facts['distribution_major_version'] }}.ngx
22+
version: =1.27.1-1.sles{{ ansible_facts['distribution_major_version'] }}.ngx
2323
cacheable: true
2424
when: ansible_facts['os_family'] == "Suse"
2525
tasks:

0 commit comments

Comments
 (0)