diff --git a/CHANGELOG.md b/CHANGELOG.md index 98f711e6f..090ddfd47 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ FEATURES: * Add support for NGINX OSS on Ubuntu jammy (22.04). * Add CODEOWNERS file. +* Add support for NGINX OSS on RHEL 9. ENHANCEMENTS: diff --git a/README.md b/README.md index 15ad5b0c5..213f21d59 100644 --- a/README.md +++ b/README.md @@ -87,6 +87,7 @@ Debian: Red Hat: - 7.4+ - 8 + - 9 SUSE/SLES: - 12 - 15 diff --git a/meta/main.yml b/meta/main.yml index b2d97fb5c..f27d26be5 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -24,6 +24,7 @@ galaxy_info: versions: - '7' - '8' + - '9' - name: FreeBSD versions: - '12.1' diff --git a/molecule/default/molecule.yml b/molecule/default/molecule.yml index f5cd5a903..4df6a937d 100644 --- a/molecule/default/molecule.yml +++ b/molecule/default/molecule.yml @@ -62,6 +62,13 @@ platforms: volumes: - "/sys/fs/cgroup:/sys/fs/cgroup:rw" command: "/usr/sbin/init" + - name: rhel-9 + image: registry.access.redhat.com/ubi9/ubi:9.0.0 + dockerfile: ../common/Dockerfile.j2 + privileged: true + volumes: + - "/sys/fs/cgroup:/sys/fs/cgroup:rw" + command: "/usr/sbin/init" - name: debian-buster image: debian:buster-slim dockerfile: ../common/Dockerfile.j2 diff --git a/molecule/downgrade/molecule.yml b/molecule/downgrade/molecule.yml index 9bb9c3850..56004e0c4 100644 --- a/molecule/downgrade/molecule.yml +++ b/molecule/downgrade/molecule.yml @@ -34,6 +34,13 @@ platforms: volumes: - "/sys/fs/cgroup:/sys/fs/cgroup:rw" command: "/usr/sbin/init" + - name: rhel-9 + image: registry.access.redhat.com/ubi9/ubi:9.0.0 + dockerfile: ../common/Dockerfile.j2 + privileged: true + volumes: + - "/sys/fs/cgroup:/sys/fs/cgroup:rw" + command: "/usr/sbin/init" - name: debian-buster image: debian:buster-slim dockerfile: ../common/Dockerfile.j2 diff --git a/molecule/downgrade/prepare.yml b/molecule/downgrade/prepare.yml index f73160ffd..4ab75bc54 100644 --- a/molecule/downgrade/prepare.yml +++ b/molecule/downgrade/prepare.yml @@ -12,7 +12,7 @@ when: ansible_facts['os_family'] == "Debian" - name: Set repo if Red Hat ansible.builtin.set_fact: - version: "-1.21.5-1.{{ (ansible_facts['distribution'] == 'Amazon') | ternary('amzn2', ('el' + ansible_facts['distribution_major_version'] | string)) }}.ngx" + version: "-1.21.6-1.{{ (ansible_facts['distribution'] == 'Amazon') | ternary('amzn2', ('el' + ansible_facts['distribution_major_version'] | string)) }}.ngx" when: ansible_facts['os_family'] == "RedHat" tasks: - name: Install NGINX diff --git a/molecule/module/molecule.yml b/molecule/module/molecule.yml index f5cd5a903..4df6a937d 100644 --- a/molecule/module/molecule.yml +++ b/molecule/module/molecule.yml @@ -62,6 +62,13 @@ platforms: volumes: - "/sys/fs/cgroup:/sys/fs/cgroup:rw" command: "/usr/sbin/init" + - name: rhel-9 + image: registry.access.redhat.com/ubi9/ubi:9.0.0 + dockerfile: ../common/Dockerfile.j2 + privileged: true + volumes: + - "/sys/fs/cgroup:/sys/fs/cgroup:rw" + command: "/usr/sbin/init" - name: debian-buster image: debian:buster-slim dockerfile: ../common/Dockerfile.j2 diff --git a/molecule/plus/molecule.yml b/molecule/plus/molecule.yml index 05359863c..6364c4e0a 100644 --- a/molecule/plus/molecule.yml +++ b/molecule/plus/molecule.yml @@ -62,6 +62,13 @@ platforms: volumes: - "/sys/fs/cgroup:/sys/fs/cgroup:rw" command: "/usr/sbin/init" + - name: rhel-9 + image: registry.access.redhat.com/ubi9/ubi:9.0.0 + dockerfile: ../common/Dockerfile.j2 + privileged: true + volumes: + - "/sys/fs/cgroup:/sys/fs/cgroup:rw" + command: "/usr/sbin/init" - name: debian-buster image: debian:buster-slim dockerfile: ../common/Dockerfile.j2 diff --git a/molecule/source/molecule.yml b/molecule/source/molecule.yml index f5cd5a903..4df6a937d 100644 --- a/molecule/source/molecule.yml +++ b/molecule/source/molecule.yml @@ -62,6 +62,13 @@ platforms: volumes: - "/sys/fs/cgroup:/sys/fs/cgroup:rw" command: "/usr/sbin/init" + - name: rhel-9 + image: registry.access.redhat.com/ubi9/ubi:9.0.0 + dockerfile: ../common/Dockerfile.j2 + privileged: true + volumes: + - "/sys/fs/cgroup:/sys/fs/cgroup:rw" + command: "/usr/sbin/init" - name: debian-buster image: debian:buster-slim dockerfile: ../common/Dockerfile.j2 diff --git a/molecule/uninstall/molecule.yml b/molecule/uninstall/molecule.yml index 19a3e2250..7f1e3f0c6 100644 --- a/molecule/uninstall/molecule.yml +++ b/molecule/uninstall/molecule.yml @@ -62,6 +62,13 @@ platforms: volumes: - "/sys/fs/cgroup:/sys/fs/cgroup:rw" command: "/usr/sbin/init" + - name: rhel-9 + image: registry.access.redhat.com/ubi9/ubi:9.0.0 + dockerfile: ../common/Dockerfile.j2 + privileged: true + volumes: + - "/sys/fs/cgroup:/sys/fs/cgroup:rw" + command: "/usr/sbin/init" - name: debian-buster image: debian:buster-slim dockerfile: ../common/Dockerfile.j2 diff --git a/molecule/uninstall_plus/molecule.yml b/molecule/uninstall_plus/molecule.yml index 05359863c..6364c4e0a 100644 --- a/molecule/uninstall_plus/molecule.yml +++ b/molecule/uninstall_plus/molecule.yml @@ -62,6 +62,13 @@ platforms: volumes: - "/sys/fs/cgroup:/sys/fs/cgroup:rw" command: "/usr/sbin/init" + - name: rhel-9 + image: registry.access.redhat.com/ubi9/ubi:9.0.0 + dockerfile: ../common/Dockerfile.j2 + privileged: true + volumes: + - "/sys/fs/cgroup:/sys/fs/cgroup:rw" + command: "/usr/sbin/init" - name: debian-buster image: debian:buster-slim dockerfile: ../common/Dockerfile.j2 diff --git a/molecule/upgrade/molecule.yml b/molecule/upgrade/molecule.yml index 9bb9c3850..56004e0c4 100644 --- a/molecule/upgrade/molecule.yml +++ b/molecule/upgrade/molecule.yml @@ -34,6 +34,13 @@ platforms: volumes: - "/sys/fs/cgroup:/sys/fs/cgroup:rw" command: "/usr/sbin/init" + - name: rhel-9 + image: registry.access.redhat.com/ubi9/ubi:9.0.0 + dockerfile: ../common/Dockerfile.j2 + privileged: true + volumes: + - "/sys/fs/cgroup:/sys/fs/cgroup:rw" + command: "/usr/sbin/init" - name: debian-buster image: debian:buster-slim dockerfile: ../common/Dockerfile.j2 diff --git a/molecule/upgrade/prepare.yml b/molecule/upgrade/prepare.yml index f73160ffd..4ab75bc54 100644 --- a/molecule/upgrade/prepare.yml +++ b/molecule/upgrade/prepare.yml @@ -12,7 +12,7 @@ when: ansible_facts['os_family'] == "Debian" - name: Set repo if Red Hat ansible.builtin.set_fact: - version: "-1.21.5-1.{{ (ansible_facts['distribution'] == 'Amazon') | ternary('amzn2', ('el' + ansible_facts['distribution_major_version'] | string)) }}.ngx" + version: "-1.21.6-1.{{ (ansible_facts['distribution'] == 'Amazon') | ternary('amzn2', ('el' + ansible_facts['distribution_major_version'] | string)) }}.ngx" when: ansible_facts['os_family'] == "RedHat" tasks: - name: Install NGINX diff --git a/tasks/modules/install-modules.yml b/tasks/modules/install-modules.yml index fe893f3fe..62bcf401a 100644 --- a/tasks/modules/install-modules.yml +++ b/tasks/modules/install-modules.yml @@ -43,7 +43,7 @@ or (ansible_facts['os_family'] == "Suse" and ansible_facts['distribution_major_version'] is version('12', '<'))) - not (item.name | default(item) == "geoip") or not ((ansible_facts['os_family'] == "FreeBSD") - or (ansible_facts['os_family'] == "RedHat" and ansible_facts['distribution_major_version'] is version('8', '=='))) + or (ansible_facts['os_family'] == "RedHat" and ansible_facts['distribution_major_version'] is version('8', '>='))) - not (item.name | default(item) == "geoip2") or not ((ansible_facts['distribution'] == 'Amazon') or (ansible_facts['os_family'] == "Suse"))