Skip to content
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
2 changes: 1 addition & 1 deletion .github/workflows/requirements/requirements_molecule.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ansible-core==2.12.1
jinja2==3.0.3
ansible-lint==5.3.1
ansible-lint==5.3.2
yamllint==1.26.3
molecule[docker]==3.5.2
docker==5.0.3
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

## 0.23.0 (Unreleased)

BREAKING CHANGES:

CentOS 8 has reached EoL and has thus been removed from the list of supported platforms.

BUG FIXES:

The Molecule `upgrade` scenario verification test no longer has to be updated on each new NGINX OSS release.

## 0.22.0 (December 9, 2021)

BREAKING CHANGES:
Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ Amazon Linux:
- 2
CentOS:
- 7.4+
- 8
Debian:
- buster (10)
- bullseye (11)
Expand Down Expand Up @@ -109,7 +108,6 @@ Amazon Linux 2:
- any
CentOS:
- 7.4+
- 8
Debian:
- buster (10)
- bullseye (11)
Expand Down
6 changes: 3 additions & 3 deletions molecule/default/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
pre_tasks:
- name: Set repo if Alpine
set_fact:
version: "=1.21.4-r1"
version: "=1.21.5-r1"
when: ansible_facts['os_family'] == "Alpine"
- name: Set repo if Debian
set_fact:
version: "=1.21.4-1~{{ ansible_facts['distribution_release'] }}"
version: "=1.21.5-1~{{ ansible_facts['distribution_release'] }}"
when: ansible_facts['os_family'] == "Debian"
- name: Set repo if Red Hat
set_fact:
version: "-1.21.4-1.{{ (ansible_facts['distribution']=='Amazon') | ternary('amzn2', ('el' + ansible_facts['distribution_major_version'] | string)) }}.ngx"
version: "-1.21.5-1.{{ (ansible_facts['distribution']=='Amazon') | ternary('amzn2', ('el' + ansible_facts['distribution_major_version'] | string)) }}.ngx"
when: ansible_facts['os_family'] == "RedHat"
- name: Enable NGINX @CentOS-AppStream dnf modules
shell:
Expand Down
7 changes: 0 additions & 7 deletions molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,6 @@ platforms:
volumes:
- "/sys/fs/cgroup:/sys/fs/cgroup:rw"
command: "/usr/sbin/init"
- name: centos-8
image: centos:8
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
Expand Down
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.4')
failed_when: version is not search('1.21.5')
7 changes: 0 additions & 7 deletions molecule/downgrade/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,6 @@ platforms:
volumes:
- "/sys/fs/cgroup:/sys/fs/cgroup:rw"
command: "/usr/sbin/init"
- name: centos-8
image: centos:8
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
Expand Down
7 changes: 0 additions & 7 deletions molecule/module/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,6 @@ platforms:
volumes:
- "/sys/fs/cgroup:/sys/fs/cgroup:rw"
command: "/usr/sbin/init"
- name: centos-8
image: centos:8
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
Expand Down
7 changes: 0 additions & 7 deletions molecule/plus/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,6 @@ platforms:
volumes:
- "/sys/fs/cgroup:/sys/fs/cgroup:rw"
command: "/usr/sbin/init"
- name: centos-8
image: centos:8
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
Expand Down
7 changes: 0 additions & 7 deletions molecule/source/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,6 @@ platforms:
volumes:
- "/sys/fs/cgroup:/sys/fs/cgroup:rw"
command: "/usr/sbin/init"
- name: centos-8
image: centos:8
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
Expand Down
7 changes: 0 additions & 7 deletions molecule/uninstall/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,6 @@ platforms:
volumes:
- "/sys/fs/cgroup:/sys/fs/cgroup:rw"
command: "/usr/sbin/init"
- name: centos-8
image: centos:8
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
Expand Down
7 changes: 0 additions & 7 deletions molecule/uninstall_plus/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,6 @@ platforms:
volumes:
- "/sys/fs/cgroup:/sys/fs/cgroup:rw"
command: "/usr/sbin/init"
- name: centos-8
image: centos:8
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
Expand Down
7 changes: 0 additions & 7 deletions molecule/upgrade/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,6 @@ platforms:
volumes:
- "/sys/fs/cgroup:/sys/fs/cgroup:rw"
command: "/usr/sbin/init"
- name: centos-8
image: centos:8
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
Expand Down
6 changes: 3 additions & 3 deletions molecule/upgrade/prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
pre_tasks:
- name: Set repo if Alpine
set_fact:
version: "=1.21.3-r1"
version: "=1.21.5-r1"
when: ansible_facts['os_family'] == "Alpine"
- name: Set repo if Debian
set_fact:
version: "=1.21.3-1~{{ ansible_facts['distribution_release'] }}"
version: "=1.21.5-1~{{ ansible_facts['distribution_release'] }}"
when: ansible_facts['os_family'] == "Debian"
- name: Set repo if Red Hat
set_fact:
version: "-1.21.3-1.{{ (ansible_facts['distribution']=='Amazon') | ternary('amzn2', ('el' + ansible_facts['distribution_major_version'] | string)) }}.ngx"
version: "-1.21.5-1.{{ (ansible_facts['distribution']=='Amazon') | ternary('amzn2', ('el' + ansible_facts['distribution_major_version'] | string)) }}.ngx"
when: ansible_facts['os_family'] == "RedHat"
- name: Enable NGINX @CentOS-AppStream dnf modules
shell:
Expand Down
13 changes: 12 additions & 1 deletion molecule/upgrade/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,21 @@
url: http://localhost
status_code: 200

- name: Fetch NGINX version
uri:
url: https://version.nginx.com/nginx/mainline
return_content: true
check_mode: false
register: nginx_versions

- name: Set NGINX version
set_fact:
nginx_version: "{{ nginx_versions.content | regex_search('([0-9]+\\.){2}[0-9]+') }}"

- name: Verify NGINX has been upgraded
command: nginx -v
args:
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.4')
failed_when: version is not search(nginx_version)