Skip to content

Support NGINX OSS and NGINX Plus on AlmaLinux, Oracle Linux, and Rocky Linux #562

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 26 commits into from
Jan 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Main global owner #
#####################

* @alessfg
/.github/workflows/
*.md
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Changelog

## 0.23.3 (Unreleased)

FEATURES:

* Add AlmaLinux, Oracle Linux and Rocky Linux to the list of NGINX OSS and NGINX Plus tested and supported platforms.
* 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).

BUG FIXES:

* Fix an issue when installing the GeoIP2 module on an UBI 7 container where the the `libmaxminddb` package dependency might not be available via `yum` (if it's not available, `libmaxminddb` is installed from an external source).

## 0.23.2 (September 28, 2022)

FEATURES:
Expand Down
23 changes: 19 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,22 +74,31 @@ The NGINX Ansible role supports all platforms supported by [NGINX Open Source](h
### NGINX Open Source

```yaml
AlmaLinux:
- 8
- 9
Alpine:
- 3.13
- 3.14
- 3.15
- 3.16
- 3.17
Amazon Linux:
- 2
CentOS:
- 7.4+
Debian:
- buster (10)
- bullseye (11)
Oracle Linux:
- 7
- 8
- 9
Red Hat:
- 7.4+
- 8
- 9
Rocky Linux:
- 8
- 9
SUSE/SLES:
- 12
- 15
Expand All @@ -103,17 +112,20 @@ Ubuntu:
### NGINX Plus

```yaml
AlmaLinux:
- 8
- 9
Alpine:
- 3.13
- 3.14
- 3.15
- 3.16
- 3.17
Amazon Linux 2:
- any
CentOS:
- 7.4+
Debian:
- buster (10)
- bullseye (11)
FreeBSD:
- 12.1+
Expand All @@ -124,6 +136,9 @@ Red Hat:
- 7.4+
- 8
- 9
Rocky Linux:
- 8
- 9
SUSE/SLES:
- 12
- 15
Expand Down Expand Up @@ -210,4 +225,4 @@ You can find the Ansible NGINX Unit role to install NGINX Unit [here](https://gi

[Tom Gamull](https://github.com/magicalyak)

© [F5 Networks, Inc.](https://www.f5.com/) 2018 - 2022
© [F5, Inc.](https://www.f5.com/) 2018 - 2022
7 changes: 4 additions & 3 deletions defaults/main/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ nginx_type: opensource

# (Optional) Specify which version of NGINX you want to install.
# Default is to install the latest release.
# nginx_version: "=19-1~bionic"
# For NGINX Plus and modules you'll need a wilcard like below (which installs plus-20 and modules)
# nginx_version: "-20*"
# For NGINX Open Source you'll need to specify the relevant release like below (Ubuntu jammy example).
# nginx_version: "=1.23.2-1~jammy"
# For NGINX Plus you'll need to specify the R* release like below (Ubuntu jammy example).
# nginx_version: "=28-1~jammy"

# Start NGINX service.
# Default is true.
Expand Down
8 changes: 4 additions & 4 deletions molecule/default/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@
pre_tasks:
- name: Set repo if Alpine
ansible.builtin.set_fact:
version: =1.21.6-r1
version: =1.23.2-r1
when: ansible_facts['os_family'] == "Alpine"
- name: Set repo if Debian
ansible.builtin.set_fact:
version: =1.21.6-1~{{ ansible_facts['distribution_release'] }}
version: =1.23.2-1~{{ ansible_facts['distribution_release'] }}
when: ansible_facts['os_family'] == "Debian"
- name: Set repo if Red Hat
ansible.builtin.set_fact:
version: -1.21.6-1.{{ (ansible_facts['distribution'] == "Amazon") | ternary('amzn2', ('el' + ansible_facts['distribution_major_version'] | string)) }}.ngx
version: -1.23.2-1.{{ (ansible_facts['distribution'] == "Amazon") | ternary('amzn2', ('el' + ansible_facts['distribution_major_version'] | string)) }}.ngx
when: ansible_facts['os_family'] == "RedHat"
- name: Set repo if SLES
ansible.builtin.set_fact:
version: =1.21.6-1.sles{{ ansible_facts['distribution_major_version'] }}.ngx
version: =1.23.2-1.sles{{ ansible_facts['distribution_major_version'] }}.ngx
when: ansible_facts['os_family'] == "Suse"
tasks:
- name: Install NGINX
Expand Down
79 changes: 61 additions & 18 deletions molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,20 @@ lint: |
set -e
ansible-lint --force-color
platforms:
- name: alpine-3.13
image: alpine:3.13
- name: almalinux-8
image: almalinux:8
dockerfile: ../common/Dockerfile.j2
privileged: true
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
command: /sbin/init
command: /usr/sbin/init
- name: almalinux-9
image: almalinux:9
dockerfile: ../common/Dockerfile.j2
privileged: true
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
command: /usr/sbin/init
- name: alpine-3.14
image: alpine:3.14
dockerfile: ../common/Dockerfile.j2
Expand All @@ -33,6 +40,13 @@ platforms:
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
command: /sbin/init
- name: alpine-3.17
image: alpine:3.17
dockerfile: ../common/Dockerfile.j2
privileged: true
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
command: /sbin/init
- name: amazonlinux-2
image: amazonlinux:2
dockerfile: ../common/Dockerfile.j2
Expand All @@ -47,6 +61,34 @@ platforms:
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
command: /usr/sbin/init
- name: debian-bullseye
image: debian:bullseye-slim
dockerfile: ../common/Dockerfile.j2
privileged: true
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
command: /sbin/init
- name: oraclelinux-7
image: oraclelinux:7
dockerfile: ../common/Dockerfile.j2
privileged: true
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
command: /usr/sbin/init
- name: oraclelinux-8
image: oraclelinux:8
dockerfile: ../common/Dockerfile.j2
privileged: true
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
command: /usr/sbin/init
- name: oraclelinux-9
image: oraclelinux:9
dockerfile: ../common/Dockerfile.j2
privileged: true
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
command: /usr/sbin/init
- name: rhel-7
image: registry.access.redhat.com/ubi7/ubi:7.9
dockerfile: ../common/Dockerfile.j2
Expand All @@ -55,33 +97,40 @@ platforms:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
command: /usr/sbin/init
- name: rhel-8
image: registry.access.redhat.com/ubi8/ubi:8.5
image: redhat/ubi8:8.7
dockerfile: ../common/Dockerfile.j2
privileged: true
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
image: redhat/ubi9:9.1.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
- name: rockylinux-8
image: rockylinux:8
dockerfile: ../common/Dockerfile.j2
privileged: true
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
command: /sbin/init
- name: debian-bullseye
image: debian:bullseye-slim
command: /usr/sbin/init
- name: rockylinux-9
image: rockylinux:9.0.20220720
dockerfile: ../common/Dockerfile.j2
privileged: true
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
command: /sbin/init
command: /usr/sbin/init
- name: sles15
image: registry.suse.com/bci/bci-base:15.4
dockerfile: ../common/Dockerfile.j2
privileged: true
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
command: /usr/sbin/init
- name: ubuntu-bionic
image: ubuntu:bionic
dockerfile: ../common/Dockerfile.j2
Expand All @@ -103,15 +152,9 @@ platforms:
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
command: /sbin/init
- name: sles15
image: registry.suse.com/bci/bci-base:15.4
dockerfile: ../common/Dockerfile.j2
privileged: true
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
command: /usr/sbin/init
provisioner:
name: ansible
log: true
playbooks:
converge: converge.yml
verify: verify.yml
2 changes: 1 addition & 1 deletion molecule/default/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@
chdir: "{{ ((ansible_facts['system'] | lower is not search('bsd')) | ternary('/etc/nginx', '/usr/local/sbin')) }}"
changed_when: false
register: version
failed_when: version is not search('1.21.6')
failed_when: version is not search('1.23.2')
8 changes: 4 additions & 4 deletions molecule/downgrade/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@
pre_tasks:
- name: Set repo if Alpine
ansible.builtin.set_fact:
version: =1.21.6-r1
version: =1.23.2-r1
when: ansible_facts['os_family'] == "Alpine"
- name: Set repo if Debian
ansible.builtin.set_fact:
version: =1.21.6-1~{{ ansible_facts['distribution_release'] }}
version: =1.23.2-1~{{ ansible_facts['distribution_release'] }}
when: ansible_facts['os_family'] == "Debian"
- name: Set repo if Red Hat
ansible.builtin.set_fact:
version: -1.21.6-1.{{ (ansible_facts['distribution'] == "Amazon") | ternary('amzn2', ('el' + ansible_facts['distribution_major_version'] | string)) }}.ngx
version: -1.23.2-1.{{ (ansible_facts['distribution'] == "Amazon") | ternary('amzn2', ('el' + ansible_facts['distribution_major_version'] | string)) }}.ngx
when: ansible_facts['os_family'] == "RedHat"
- name: Set repo if SLES
ansible.builtin.set_fact:
version: =1.21.6-1.sles{{ ansible_facts['distribution_major_version'] }}.ngx
version: =1.23.2-1.sles{{ ansible_facts['distribution_major_version'] }}.ngx
when: ansible_facts['os_family'] == "Suse"
tasks:
- name: Install NGINX
Expand Down
Loading