Skip to content
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

Update Molecule to support NGINX Plus R31 #681

Merged
merged 5 commits into from
Dec 22, 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
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

## 0.24.3 (Unreleased)

FEATURES:

- Add Alpine Linux 3.19 to the list of NGINX Plus tested and supported distributions.
- Remove Alpine Linux 3.15 from the list of NGINX Plus tested and supported distributions.

ENHANCEMENTS:

- Allow strings in addition to a list when configuring `logrotate`.
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,10 @@ AlmaLinux:
- 8
- 9
Alpine:
- 3.15
- 3.16
- 3.17
- 3.18
- 3.19
Amazon Linux:
- 2
CentOS:
Expand All @@ -146,6 +146,7 @@ Debian:
FreeBSD:
- 12.1+
- 13
- 14
Oracle Linux:
- 7.4+
- 8.1+
Expand Down
2 changes: 1 addition & 1 deletion meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ galaxy_info:
- name: EL
versions: ['7', '8', '9']
- name: FreeBSD
versions: ['12.1', '12.2', '12.3', '12.4', '13.0', '13.1', '13.2']
versions: ['12.1', '12.2', '12.3', '12.4', '13.0', '13.1', '13.2', '14']
- name: OracleLinux
versions: ['7', '8', '9']
- name: Ubuntu
Expand Down
8 changes: 4 additions & 4 deletions molecule/downgrade-plus/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: =29-r1
version: =30-r1
when: ansible_facts['os_family'] == "Alpine"
- name: Set repo if Debian
ansible.builtin.set_fact:
version: =29-1~{{ ansible_facts['distribution_release'] }}
version: =30-1~{{ ansible_facts['distribution_release'] }}
when: ansible_facts['os_family'] == "Debian"
- name: Set repo if Red Hat
ansible.builtin.set_fact:
version: -29-1.{{ (ansible_facts['distribution'] == "Amazon") | ternary('amzn2', ('el' + ansible_facts['distribution_major_version'] | string)) }}.ngx
version: -30-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: =29-1.sles{{ ansible_facts['distribution_major_version'] }}.ngx
version: =30-1.sles{{ ansible_facts['distribution_major_version'] }}.ngx
when: ansible_facts['os_family'] == "Suse"
tasks:
- name: Install NGINX
Expand Down
38 changes: 19 additions & 19 deletions molecule/downgrade-plus/molecule.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
driver:
name: docker
platforms: # Alpine 3.18 and Debian bookworm only have one version of NGINX Plus available (at the moment) so it's impossible to test the downgrade scenario
platforms: # Alpine 3.19 only has one version of NGINX Plus available (at the moment) so it's impossible to test the downgrade scenario
- name: almalinux-8
image: almalinux:8
dockerfile: ../common/Dockerfile.j2
Expand All @@ -18,14 +18,6 @@ platforms: # Alpine 3.18 and Debian bookworm only have one version of NGINX Plus
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
command: /usr/sbin/init
- name: alpine-3.15
image: alpine:3.15
dockerfile: ../common/Dockerfile.j2
privileged: true
cgroupns_mode: host
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
command: /sbin/init
- name: alpine-3.16
image: alpine:3.16
platform: x86_64
Expand All @@ -44,8 +36,16 @@ platforms: # Alpine 3.18 and Debian bookworm only have one version of NGINX Plus
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
command: /sbin/init
# - name: alpine-3.18
# image: alpine:3.18
- name: alpine-3.18
image: alpine:3.18
dockerfile: ../common/Dockerfile.j2
privileged: true
cgroupns_mode: host
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
command: /sbin/init
# - name: alpine-3.19
# image: alpine:3.19
# dockerfile: ../common/Dockerfile.j2
# privileged: true
# cgroupns_mode: host
Expand Down Expand Up @@ -78,14 +78,14 @@ platforms: # Alpine 3.18 and Debian bookworm only have one version of NGINX Plus
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
command: /sbin/init
# - name: debian-bookworm
# image: debian:bookworm-slim
# dockerfile: ../common/Dockerfile.j2
# privileged: true
# cgroupns_mode: host
# volumes:
# - /sys/fs/cgroup:/sys/fs/cgroup:rw
# command: /sbin/init
- name: debian-bookworm
image: debian:bookworm-slim
dockerfile: ../common/Dockerfile.j2
privileged: true
cgroupns_mode: host
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
command: /sbin/init
- name: oraclelinux-7
image: oraclelinux:7
platform: x86_64
Expand Down
2 changes: 1 addition & 1 deletion molecule/downgrade-plus/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('29')
failed_when: version is not search('30')
16 changes: 8 additions & 8 deletions molecule/plus/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,6 @@ platforms:
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
command: /usr/sbin/init
- name: alpine-3.15
image: alpine:3.15
dockerfile: ../common/Dockerfile.j2
privileged: true
cgroupns_mode: host
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
command: /sbin/init
- name: alpine-3.16
image: alpine:3.16
platform: x86_64
Expand All @@ -52,6 +44,14 @@ platforms:
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
command: /sbin/init
- name: alpine-3.19
image: alpine:3.19
dockerfile: ../common/Dockerfile.j2
privileged: true
cgroupns_mode: host
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
command: /sbin/init
- name: amazonlinux-2
image: amazonlinux:2
platform: x86_64
Expand Down
19 changes: 9 additions & 10 deletions molecule/uninstall-plus/molecule.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
driver:
name: docker
platforms: # Ubuntu bionic results in a segmentation fault error as of Ansible core 2.13
platforms:
- name: almalinux-8
image: almalinux:8
dockerfile: ../common/Dockerfile.j2
Expand All @@ -18,14 +18,6 @@ platforms: # Ubuntu bionic results in a segmentation fault error as of Ansible c
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
command: /usr/sbin/init
- name: alpine-3.15
image: alpine:3.15
dockerfile: ../common/Dockerfile.j2
privileged: true
cgroupns_mode: host
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
command: /sbin/init
- name: alpine-3.16
image: alpine:3.16
platform: x86_64
Expand All @@ -46,7 +38,14 @@ platforms: # Ubuntu bionic results in a segmentation fault error as of Ansible c
command: /sbin/init
- name: alpine-3.18
image: alpine:3.18
# platform: aarch64
dockerfile: ../common/Dockerfile.j2
privileged: true
cgroupns_mode: host
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
command: /sbin/init
- name: alpine-3.19
image: alpine:3.19
dockerfile: ../common/Dockerfile.j2
privileged: true
cgroupns_mode: host
Expand Down
38 changes: 19 additions & 19 deletions molecule/upgrade-plus/molecule.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
driver:
name: docker
platforms: # Alpine 3.18 and Debian bookworm only have one version of NGINX Plus available (at the moment) so it's impossible to test the downgrade scenario
platforms: # Alpine 3.19 only has one version of NGINX Plus available (at the moment) so it's impossible to test the downgrade scenario
- name: almalinux-8
image: almalinux:8
dockerfile: ../common/Dockerfile.j2
Expand All @@ -18,14 +18,6 @@ platforms: # Alpine 3.18 and Debian bookworm only have one version of NGINX Plus
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
command: /usr/sbin/init
- name: alpine-3.15
image: alpine:3.15
dockerfile: ../common/Dockerfile.j2
privileged: true
cgroupns_mode: host
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
command: /sbin/init
- name: alpine-3.16
image: alpine:3.16
platform: x86_64
Expand All @@ -44,8 +36,16 @@ platforms: # Alpine 3.18 and Debian bookworm only have one version of NGINX Plus
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
command: /sbin/init
# - name: alpine-3.18
# image: alpine:3.18
- name: alpine-3.18
image: alpine:3.18
dockerfile: ../common/Dockerfile.j2
privileged: true
cgroupns_mode: host
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
command: /sbin/init
# - name: alpine-3.19
# image: alpine:3.19
# dockerfile: ../common/Dockerfile.j2
# privileged: true
# cgroupns_mode: host
Expand Down Expand Up @@ -78,14 +78,14 @@ platforms: # Alpine 3.18 and Debian bookworm only have one version of NGINX Plus
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
command: /sbin/init
# - name: debian-bookworm
# image: debian:bookworm-slim
# dockerfile: ../common/Dockerfile.j2
# privileged: true
# cgroupns_mode: host
# volumes:
# - /sys/fs/cgroup:/sys/fs/cgroup:rw
# command: /sbin/init
- name: debian-bookworm
image: debian:bookworm-slim
dockerfile: ../common/Dockerfile.j2
privileged: true
cgroupns_mode: host
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
command: /sbin/init
- name: oraclelinux-7
image: oraclelinux:7
platform: x86_64
Expand Down
8 changes: 4 additions & 4 deletions molecule/upgrade-plus/prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,19 @@
pre_tasks:
- name: Set repo if Alpine
ansible.builtin.set_fact:
version: =29-r1
version: =30-r1
when: ansible_facts['os_family'] == "Alpine"
- name: Set repo if Debian
ansible.builtin.set_fact:
version: =29-1~{{ ansible_facts['distribution_release'] }}
version: =30-1~{{ ansible_facts['distribution_release'] }}
when: ansible_facts['os_family'] == "Debian"
- name: Set repo if Red Hat
ansible.builtin.set_fact:
version: -29-1.{{ (ansible_facts['distribution'] == "Amazon") | ternary('amzn2', ('el' + ansible_facts['distribution_major_version'] | string)) }}.ngx
version: -30-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: =29-1.sles{{ ansible_facts['distribution_major_version'] }}.ngx
version: =30-1.sles{{ ansible_facts['distribution_major_version'] }}.ngx
when: ansible_facts['os_family'] == "Suse"
tasks:
- name: Install NGINX
Expand Down
4 changes: 2 additions & 2 deletions vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ nginx_plus_supported_distributions:
architectures: [x86_64, aarch64]
alpine:
name: Alpine Linux
versions: [3.15, 3.16, 3.17, 3.18]
versions: [3.16, 3.17, 3.18, 3.19]
architectures: [x86_64, aarch64]
amazon:
name: Amazon Linux
Expand All @@ -87,7 +87,7 @@ nginx_plus_supported_distributions:
architectures: [x86_64, aarch64]
freebsd:
name: FreeBSD
versions: [12, 13]
versions: [12, 13, 14]
architectures: [x86_64]
oraclelinux:
name: Oracle Linux
Expand Down
Loading