From 4fa4a3679c39e36d992fc19feddbfcdd2d47d7f0 Mon Sep 17 00:00:00 2001 From: Alessandro Fael Garcia Date: Tue, 5 Mar 2024 13:17:39 +0100 Subject: [PATCH 1/7] Update Molecule to remove Alpine Linux 3.15 * And refactor Molecule downgrade scenario version checks to automate them --- CHANGELOG.md | 5 +++-- README.md | 2 +- molecule/amplify/cleanup.yml | 2 +- molecule/amplify/molecule.yml | 2 +- molecule/default/molecule.yml | 20 ++++++++++---------- molecule/distribution/molecule.yml | 20 ++++++++++---------- molecule/downgrade-plus/molecule.yml | 20 ++++++++++---------- molecule/downgrade-plus/prepare.yml | 6 +++--- molecule/downgrade-plus/verify.yml | 4 ++-- molecule/downgrade/molecule.yml | 20 ++++++++++---------- molecule/downgrade/prepare.yml | 2 +- molecule/downgrade/verify.yml | 2 +- molecule/plus/molecule.yml | 4 ++-- molecule/plus/prepare.yml | 4 ++-- molecule/source-version/molecule.yml | 20 ++++++++++---------- molecule/source/molecule.yml | 20 ++++++++++---------- molecule/stable/molecule.yml | 20 ++++++++++---------- molecule/uninstall-plus/molecule.yml | 4 ++-- molecule/uninstall-plus/prepare.yml | 6 +++--- molecule/uninstall/molecule.yml | 20 ++++++++++---------- molecule/uninstall/prepare.yml | 2 +- molecule/upgrade-plus/molecule.yml | 20 ++++++++++---------- molecule/upgrade-plus/prepare.yml | 6 +++--- molecule/upgrade/molecule.yml | 20 ++++++++++---------- molecule/upgrade/prepare.yml | 2 +- molecule/version/molecule.yml | 20 ++++++++++---------- 26 files changed, 137 insertions(+), 136 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 16277b3ee..97409cdf3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,8 +4,8 @@ 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. +- Add Alpine Linux 3.19 to the list of NGINX Open Source and NGINX Plus tested and supported distributions. +- Remove Alpine Linux 3.15 from the list of NGINX Open Source and NGINX Plus tested and supported distributions. ENHANCEMENTS: @@ -19,6 +19,7 @@ BUG FIXES: CI/CD: - Add Molecule tests for NGINX Amplify. +- Update the RHEL based tests to use the latest UBI release. - Use the local role name (`ansible-role-nginx`) instead of the fully qualified role name (`nginxinc.nginx`) in Molecule to ensure tests always work as intended in environments where the role has been already installed beforehand. ## 0.24.2 (October 3rd, 2023) diff --git a/README.md b/README.md index b62bc4c53..1aa3b05bb 100644 --- a/README.md +++ b/README.md @@ -94,10 +94,10 @@ AlmaLinux: - 8 - 9 Alpine: - - 3.15 - 3.16 - 3.17 - 3.18 + - 3.19 Amazon Linux: - 2 CentOS: diff --git a/molecule/amplify/cleanup.yml b/molecule/amplify/cleanup.yml index 6ba5ec87d..963033518 100644 --- a/molecule/amplify/cleanup.yml +++ b/molecule/amplify/cleanup.yml @@ -14,7 +14,7 @@ - name: Containers are not up, quit from here ansible.builtin.fail: - when: container['failed'] + when: container['failed'] | bool - name: Gather facts ansible.builtin.setup: diff --git a/molecule/amplify/molecule.yml b/molecule/amplify/molecule.yml index 9cbe60cf8..df5f6bf7f 100644 --- a/molecule/amplify/molecule.yml +++ b/molecule/amplify/molecule.yml @@ -28,7 +28,7 @@ platforms: - /sys/fs/cgroup:/sys/fs/cgroup:rw command: /usr/sbin/init - name: rhel-9 - image: redhat/ubi9:9.1.0 + image: redhat/ubi9:9.3 # platform: aarch64 dockerfile: ../common/Dockerfile.j2 privileged: true diff --git a/molecule/default/molecule.yml b/molecule/default/molecule.yml index 4ef787321..187189455 100644 --- a/molecule/default/molecule.yml +++ b/molecule/default/molecule.yml @@ -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 @@ -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 @@ -121,7 +121,7 @@ platforms: - /sys/fs/cgroup:/sys/fs/cgroup:rw command: /usr/sbin/init - name: rhel-8 - image: redhat/ubi8:8.7 + image: redhat/ubi8:8.9 # platform: s390x dockerfile: ../common/Dockerfile.j2 privileged: true @@ -130,7 +130,7 @@ platforms: - /sys/fs/cgroup:/sys/fs/cgroup:rw command: /usr/sbin/init - name: rhel-9 - image: redhat/ubi9:9.1.0 + image: redhat/ubi9:9.3 # platform: aarch64 dockerfile: ../common/Dockerfile.j2 privileged: true diff --git a/molecule/distribution/molecule.yml b/molecule/distribution/molecule.yml index 9436c4382..c9bd2f80f 100644 --- a/molecule/distribution/molecule.yml +++ b/molecule/distribution/molecule.yml @@ -18,14 +18,6 @@ platforms: # The RHEL UBI 7 image fails to install some NGINX dependencies when 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 @@ -52,6 +44,14 @@ platforms: # The RHEL UBI 7 image fails to install some NGINX dependencies when 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 @@ -121,7 +121,7 @@ platforms: # The RHEL UBI 7 image fails to install some NGINX dependencies when # - /sys/fs/cgroup:/sys/fs/cgroup:rw # command: /usr/sbin/init - name: rhel-8 - image: redhat/ubi8:8.7 + image: redhat/ubi8:8.9 # platform: s390x dockerfile: ../common/Dockerfile.j2 privileged: true @@ -130,7 +130,7 @@ platforms: # The RHEL UBI 7 image fails to install some NGINX dependencies when - /sys/fs/cgroup:/sys/fs/cgroup:rw command: /usr/sbin/init - name: rhel-9 - image: redhat/ubi9:9.1.0 + image: redhat/ubi9:9.3 # platform: aarch64 dockerfile: ../common/Dockerfile.j2 privileged: true diff --git a/molecule/downgrade-plus/molecule.yml b/molecule/downgrade-plus/molecule.yml index 782a2d7d5..357ba9f67 100644 --- a/molecule/downgrade-plus/molecule.yml +++ b/molecule/downgrade-plus/molecule.yml @@ -44,14 +44,14 @@ platforms: # Alpine 3.19 only has one version of NGINX Plus available (at the mo 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: 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 @@ -121,7 +121,7 @@ platforms: # Alpine 3.19 only has one version of NGINX Plus available (at the mo - /sys/fs/cgroup:/sys/fs/cgroup:rw command: /usr/sbin/init - name: rhel-8 - image: redhat/ubi8:8.7 + image: redhat/ubi8:8.9 # platform: s390x dockerfile: ../common/Dockerfile.j2 privileged: true @@ -130,7 +130,7 @@ platforms: # Alpine 3.19 only has one version of NGINX Plus available (at the mo - /sys/fs/cgroup:/sys/fs/cgroup:rw command: /usr/sbin/init - name: rhel-9 - image: redhat/ubi9:9.1.0 + image: redhat/ubi9:9.3 # platform: aarch64 dockerfile: ../common/Dockerfile.j2 privileged: true diff --git a/molecule/downgrade-plus/prepare.yml b/molecule/downgrade-plus/prepare.yml index 9e46f79be..d4cc97d7e 100644 --- a/molecule/downgrade-plus/prepare.yml +++ b/molecule/downgrade-plus/prepare.yml @@ -3,14 +3,14 @@ hosts: localhost gather_facts: false tasks: - - name: Create ephemeral license certificate file from b64 decoded env var # noqa template-instead-of-copy + - name: Create ephemeral license certificate file from b64 decoded env var ansible.builtin.copy: content: "{{ lookup('env', 'NGINX_CRT') | b64decode }}" dest: ../../files/license/nginx-repo.crt force: false mode: "0444" - - name: Create ephemeral license key file from b64 decoded env var # noqa template-instead-of-copy + - name: Create ephemeral license key file from b64 decoded env var ansible.builtin.copy: content: "{{ lookup('env', 'NGINX_KEY') | b64decode }}" dest: ../../files/license/nginx-repo.key @@ -22,7 +22,7 @@ tasks: - name: Install NGINX ansible.builtin.include_role: - name: nginxinc.nginx + name: ansible-role-nginx vars: nginx_type: plus nginx_license: diff --git a/molecule/downgrade-plus/verify.yml b/molecule/downgrade-plus/verify.yml index 7895af685..0be5fec5d 100644 --- a/molecule/downgrade-plus/verify.yml +++ b/molecule/downgrade-plus/verify.yml @@ -29,5 +29,5 @@ 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('30') + register: version_check + failed_when: version_check is not search(version['content'] | regex_search('[0-9]+')) diff --git a/molecule/downgrade/molecule.yml b/molecule/downgrade/molecule.yml index 45cd5fddc..0ef6fbdff 100644 --- a/molecule/downgrade/molecule.yml +++ b/molecule/downgrade/molecule.yml @@ -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 @@ -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 @@ -121,7 +121,7 @@ platforms: - /sys/fs/cgroup:/sys/fs/cgroup:rw command: /usr/sbin/init - name: rhel-8 - image: redhat/ubi8:8.7 + image: redhat/ubi8:8.9 # platform: s390x dockerfile: ../common/Dockerfile.j2 privileged: true @@ -130,7 +130,7 @@ platforms: - /sys/fs/cgroup:/sys/fs/cgroup:rw command: /usr/sbin/init - name: rhel-9 - image: redhat/ubi9:9.1.0 + image: redhat/ubi9:9.3 # platform: aarch64 dockerfile: ../common/Dockerfile.j2 privileged: true diff --git a/molecule/downgrade/prepare.yml b/molecule/downgrade/prepare.yml index c0cbc20ef..4c8a6b4d3 100644 --- a/molecule/downgrade/prepare.yml +++ b/molecule/downgrade/prepare.yml @@ -4,4 +4,4 @@ tasks: - name: Install NGINX ansible.builtin.include_role: - name: nginxinc.nginx + name: ansible-role-nginx diff --git a/molecule/downgrade/verify.yml b/molecule/downgrade/verify.yml index 37f03049e..6e75bebf3 100644 --- a/molecule/downgrade/verify.yml +++ b/molecule/downgrade/verify.yml @@ -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.25.1') + failed_when: version is not search(nginx_version | regex_search('([0-9]+\\.){2}[0-9]+')) diff --git a/molecule/plus/molecule.yml b/molecule/plus/molecule.yml index 8b16ab580..3955d4d26 100644 --- a/molecule/plus/molecule.yml +++ b/molecule/plus/molecule.yml @@ -121,7 +121,7 @@ platforms: - /sys/fs/cgroup:/sys/fs/cgroup:rw command: /usr/sbin/init - name: rhel-8 - image: redhat/ubi8:8.7 + image: redhat/ubi8:8.9 # platform: s390x dockerfile: ../common/Dockerfile.j2 privileged: true @@ -130,7 +130,7 @@ platforms: - /sys/fs/cgroup:/sys/fs/cgroup:rw command: /usr/sbin/init - name: rhel-9 - image: redhat/ubi9:9.1.0 + image: redhat/ubi9:9.3 # platform: aarch64 dockerfile: ../common/Dockerfile.j2 privileged: true diff --git a/molecule/plus/prepare.yml b/molecule/plus/prepare.yml index 42445dd17..404450069 100644 --- a/molecule/plus/prepare.yml +++ b/molecule/plus/prepare.yml @@ -3,14 +3,14 @@ hosts: localhost gather_facts: false tasks: - - name: Create ephemeral license certificate file from b64 decoded env var # noqa template-instead-of-copy + - name: Create ephemeral license certificate file from b64 decoded env var ansible.builtin.copy: content: "{{ lookup('env', 'NGINX_CRT') | b64decode }}" dest: ../../files/license/nginx-repo.crt force: false mode: "0444" - - name: Create ephemeral license key file from b64 decoded env var # noqa template-instead-of-copy + - name: Create ephemeral license key file from b64 decoded env var ansible.builtin.copy: content: "{{ lookup('env', 'NGINX_KEY') | b64decode }}" dest: ../../files/license/nginx-repo.key diff --git a/molecule/source-version/molecule.yml b/molecule/source-version/molecule.yml index 683e7668d..3f8c3647e 100644 --- a/molecule/source-version/molecule.yml +++ b/molecule/source-version/molecule.yml @@ -18,14 +18,6 @@ platforms: # Oracle Linux 7 works in local tests but bugs out in GitHub actions 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 @@ -52,6 +44,14 @@ platforms: # Oracle Linux 7 works in local tests but bugs out in GitHub actions 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 @@ -112,7 +112,7 @@ platforms: # Oracle Linux 7 works in local tests but bugs out in GitHub actions - /sys/fs/cgroup:/sys/fs/cgroup:rw command: /usr/sbin/init - name: rhel-8 - image: redhat/ubi8:8.7 + image: redhat/ubi8:8.9 # platform: s390x dockerfile: ../common/Dockerfile.j2 privileged: true @@ -121,7 +121,7 @@ platforms: # Oracle Linux 7 works in local tests but bugs out in GitHub actions - /sys/fs/cgroup:/sys/fs/cgroup:rw command: /usr/sbin/init - name: rhel-9 - image: redhat/ubi9:9.1.0 + image: redhat/ubi9:9.3 # platform: aarch64 dockerfile: ../common/Dockerfile.j2 privileged: true diff --git a/molecule/source/molecule.yml b/molecule/source/molecule.yml index 683e7668d..3f8c3647e 100644 --- a/molecule/source/molecule.yml +++ b/molecule/source/molecule.yml @@ -18,14 +18,6 @@ platforms: # Oracle Linux 7 works in local tests but bugs out in GitHub actions 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 @@ -52,6 +44,14 @@ platforms: # Oracle Linux 7 works in local tests but bugs out in GitHub actions 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 @@ -112,7 +112,7 @@ platforms: # Oracle Linux 7 works in local tests but bugs out in GitHub actions - /sys/fs/cgroup:/sys/fs/cgroup:rw command: /usr/sbin/init - name: rhel-8 - image: redhat/ubi8:8.7 + image: redhat/ubi8:8.9 # platform: s390x dockerfile: ../common/Dockerfile.j2 privileged: true @@ -121,7 +121,7 @@ platforms: # Oracle Linux 7 works in local tests but bugs out in GitHub actions - /sys/fs/cgroup:/sys/fs/cgroup:rw command: /usr/sbin/init - name: rhel-9 - image: redhat/ubi9:9.1.0 + image: redhat/ubi9:9.3 # platform: aarch64 dockerfile: ../common/Dockerfile.j2 privileged: true diff --git a/molecule/stable/molecule.yml b/molecule/stable/molecule.yml index 4ef787321..187189455 100644 --- a/molecule/stable/molecule.yml +++ b/molecule/stable/molecule.yml @@ -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 @@ -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 @@ -121,7 +121,7 @@ platforms: - /sys/fs/cgroup:/sys/fs/cgroup:rw command: /usr/sbin/init - name: rhel-8 - image: redhat/ubi8:8.7 + image: redhat/ubi8:8.9 # platform: s390x dockerfile: ../common/Dockerfile.j2 privileged: true @@ -130,7 +130,7 @@ platforms: - /sys/fs/cgroup:/sys/fs/cgroup:rw command: /usr/sbin/init - name: rhel-9 - image: redhat/ubi9:9.1.0 + image: redhat/ubi9:9.3 # platform: aarch64 dockerfile: ../common/Dockerfile.j2 privileged: true diff --git a/molecule/uninstall-plus/molecule.yml b/molecule/uninstall-plus/molecule.yml index 8b16ab580..3955d4d26 100644 --- a/molecule/uninstall-plus/molecule.yml +++ b/molecule/uninstall-plus/molecule.yml @@ -121,7 +121,7 @@ platforms: - /sys/fs/cgroup:/sys/fs/cgroup:rw command: /usr/sbin/init - name: rhel-8 - image: redhat/ubi8:8.7 + image: redhat/ubi8:8.9 # platform: s390x dockerfile: ../common/Dockerfile.j2 privileged: true @@ -130,7 +130,7 @@ platforms: - /sys/fs/cgroup:/sys/fs/cgroup:rw command: /usr/sbin/init - name: rhel-9 - image: redhat/ubi9:9.1.0 + image: redhat/ubi9:9.3 # platform: aarch64 dockerfile: ../common/Dockerfile.j2 privileged: true diff --git a/molecule/uninstall-plus/prepare.yml b/molecule/uninstall-plus/prepare.yml index 9e46f79be..d4cc97d7e 100644 --- a/molecule/uninstall-plus/prepare.yml +++ b/molecule/uninstall-plus/prepare.yml @@ -3,14 +3,14 @@ hosts: localhost gather_facts: false tasks: - - name: Create ephemeral license certificate file from b64 decoded env var # noqa template-instead-of-copy + - name: Create ephemeral license certificate file from b64 decoded env var ansible.builtin.copy: content: "{{ lookup('env', 'NGINX_CRT') | b64decode }}" dest: ../../files/license/nginx-repo.crt force: false mode: "0444" - - name: Create ephemeral license key file from b64 decoded env var # noqa template-instead-of-copy + - name: Create ephemeral license key file from b64 decoded env var ansible.builtin.copy: content: "{{ lookup('env', 'NGINX_KEY') | b64decode }}" dest: ../../files/license/nginx-repo.key @@ -22,7 +22,7 @@ tasks: - name: Install NGINX ansible.builtin.include_role: - name: nginxinc.nginx + name: ansible-role-nginx vars: nginx_type: plus nginx_license: diff --git a/molecule/uninstall/molecule.yml b/molecule/uninstall/molecule.yml index 45cd5fddc..0ef6fbdff 100644 --- a/molecule/uninstall/molecule.yml +++ b/molecule/uninstall/molecule.yml @@ -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 @@ -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 @@ -121,7 +121,7 @@ platforms: - /sys/fs/cgroup:/sys/fs/cgroup:rw command: /usr/sbin/init - name: rhel-8 - image: redhat/ubi8:8.7 + image: redhat/ubi8:8.9 # platform: s390x dockerfile: ../common/Dockerfile.j2 privileged: true @@ -130,7 +130,7 @@ platforms: - /sys/fs/cgroup:/sys/fs/cgroup:rw command: /usr/sbin/init - name: rhel-9 - image: redhat/ubi9:9.1.0 + image: redhat/ubi9:9.3 # platform: aarch64 dockerfile: ../common/Dockerfile.j2 privileged: true diff --git a/molecule/uninstall/prepare.yml b/molecule/uninstall/prepare.yml index c0cbc20ef..4c8a6b4d3 100644 --- a/molecule/uninstall/prepare.yml +++ b/molecule/uninstall/prepare.yml @@ -4,4 +4,4 @@ tasks: - name: Install NGINX ansible.builtin.include_role: - name: nginxinc.nginx + name: ansible-role-nginx diff --git a/molecule/upgrade-plus/molecule.yml b/molecule/upgrade-plus/molecule.yml index 782a2d7d5..357ba9f67 100644 --- a/molecule/upgrade-plus/molecule.yml +++ b/molecule/upgrade-plus/molecule.yml @@ -44,14 +44,14 @@ platforms: # Alpine 3.19 only has one version of NGINX Plus available (at the mo 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: 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 @@ -121,7 +121,7 @@ platforms: # Alpine 3.19 only has one version of NGINX Plus available (at the mo - /sys/fs/cgroup:/sys/fs/cgroup:rw command: /usr/sbin/init - name: rhel-8 - image: redhat/ubi8:8.7 + image: redhat/ubi8:8.9 # platform: s390x dockerfile: ../common/Dockerfile.j2 privileged: true @@ -130,7 +130,7 @@ platforms: # Alpine 3.19 only has one version of NGINX Plus available (at the mo - /sys/fs/cgroup:/sys/fs/cgroup:rw command: /usr/sbin/init - name: rhel-9 - image: redhat/ubi9:9.1.0 + image: redhat/ubi9:9.3 # platform: aarch64 dockerfile: ../common/Dockerfile.j2 privileged: true diff --git a/molecule/upgrade-plus/prepare.yml b/molecule/upgrade-plus/prepare.yml index 1877f5b90..59c8e202f 100644 --- a/molecule/upgrade-plus/prepare.yml +++ b/molecule/upgrade-plus/prepare.yml @@ -3,14 +3,14 @@ hosts: localhost gather_facts: false tasks: - - name: Create ephemeral license certificate file from b64 decoded env var # noqa template-instead-of-copy + - name: Create ephemeral license certificate file from b64 decoded env var ansible.builtin.copy: content: "{{ lookup('env', 'NGINX_CRT') | b64decode }}" dest: ../../files/license/nginx-repo.crt force: false mode: "0444" - - name: Create ephemeral license key file from b64 decoded env var # noqa template-instead-of-copy + - name: Create ephemeral license key file from b64 decoded env var ansible.builtin.copy: content: "{{ lookup('env', 'NGINX_KEY') | b64decode }}" dest: ../../files/license/nginx-repo.key @@ -39,7 +39,7 @@ tasks: - name: Install NGINX ansible.builtin.include_role: - name: nginxinc.nginx + name: ansible-role-nginx vars: nginx_type: plus nginx_license: diff --git a/molecule/upgrade/molecule.yml b/molecule/upgrade/molecule.yml index 45cd5fddc..0ef6fbdff 100644 --- a/molecule/upgrade/molecule.yml +++ b/molecule/upgrade/molecule.yml @@ -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 @@ -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 @@ -121,7 +121,7 @@ platforms: - /sys/fs/cgroup:/sys/fs/cgroup:rw command: /usr/sbin/init - name: rhel-8 - image: redhat/ubi8:8.7 + image: redhat/ubi8:8.9 # platform: s390x dockerfile: ../common/Dockerfile.j2 privileged: true @@ -130,7 +130,7 @@ platforms: - /sys/fs/cgroup:/sys/fs/cgroup:rw command: /usr/sbin/init - name: rhel-9 - image: redhat/ubi9:9.1.0 + image: redhat/ubi9:9.3 # platform: aarch64 dockerfile: ../common/Dockerfile.j2 privileged: true diff --git a/molecule/upgrade/prepare.yml b/molecule/upgrade/prepare.yml index fbd2c325b..a7af60a13 100644 --- a/molecule/upgrade/prepare.yml +++ b/molecule/upgrade/prepare.yml @@ -21,6 +21,6 @@ tasks: - name: Install NGINX ansible.builtin.include_role: - name: nginxinc.nginx + name: ansible-role-nginx vars: nginx_version: "{{ version }}" diff --git a/molecule/version/molecule.yml b/molecule/version/molecule.yml index 4ef787321..187189455 100644 --- a/molecule/version/molecule.yml +++ b/molecule/version/molecule.yml @@ -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 @@ -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 @@ -121,7 +121,7 @@ platforms: - /sys/fs/cgroup:/sys/fs/cgroup:rw command: /usr/sbin/init - name: rhel-8 - image: redhat/ubi8:8.7 + image: redhat/ubi8:8.9 # platform: s390x dockerfile: ../common/Dockerfile.j2 privileged: true @@ -130,7 +130,7 @@ platforms: - /sys/fs/cgroup:/sys/fs/cgroup:rw command: /usr/sbin/init - name: rhel-9 - image: redhat/ubi9:9.1.0 + image: redhat/ubi9:9.3 # platform: aarch64 dockerfile: ../common/Dockerfile.j2 privileged: true From 36d5af747676aabe9db2aa5634d4edd00413795d Mon Sep 17 00:00:00 2001 From: Alessandro Fael Garcia Date: Tue, 5 Mar 2024 15:12:24 +0100 Subject: [PATCH 2/7] fixes --- molecule/downgrade-plus/molecule.yml | 16 ++++++++-------- molecule/downgrade/converge.yml | 8 ++++---- molecule/upgrade-plus/molecule.yml | 16 ++++++++-------- molecule/upgrade/prepare.yml | 8 ++++---- molecule/version/converge.yml | 16 ++++++++-------- vars/main.yml | 2 +- 6 files changed, 33 insertions(+), 33 deletions(-) diff --git a/molecule/downgrade-plus/molecule.yml b/molecule/downgrade-plus/molecule.yml index 357ba9f67..2da626035 100644 --- a/molecule/downgrade-plus/molecule.yml +++ b/molecule/downgrade-plus/molecule.yml @@ -44,14 +44,14 @@ platforms: # Alpine 3.19 only has one version of NGINX Plus available (at the mo 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: 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 diff --git a/molecule/downgrade/converge.yml b/molecule/downgrade/converge.yml index 69c25dc0e..7a38efc0a 100644 --- a/molecule/downgrade/converge.yml +++ b/molecule/downgrade/converge.yml @@ -4,19 +4,19 @@ pre_tasks: - name: Set repo if Alpine ansible.builtin.set_fact: - version: =1.25.1-r1 + version: =1.25.3-r1 when: ansible_facts['os_family'] == "Alpine" - name: Set repo if Debian ansible.builtin.set_fact: - version: =1.25.1-1~{{ ansible_facts['distribution_release'] }} + version: =1.25.3-1~{{ ansible_facts['distribution_release'] }} when: ansible_facts['os_family'] == "Debian" - name: Set repo if Red Hat ansible.builtin.set_fact: - version: -1.25.1-1.{{ (ansible_facts['distribution'] == "Amazon") | ternary('amzn2', ('el' + ansible_facts['distribution_major_version'] | string)) }}.ngx + version: -1.25.3-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.25.1-1.sles{{ ansible_facts['distribution_major_version'] }}.ngx + version: =1.25.3-1.sles{{ ansible_facts['distribution_major_version'] }}.ngx when: ansible_facts['os_family'] == "Suse" tasks: - name: Install NGINX diff --git a/molecule/upgrade-plus/molecule.yml b/molecule/upgrade-plus/molecule.yml index 357ba9f67..2da626035 100644 --- a/molecule/upgrade-plus/molecule.yml +++ b/molecule/upgrade-plus/molecule.yml @@ -44,14 +44,14 @@ platforms: # Alpine 3.19 only has one version of NGINX Plus available (at the mo 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: 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 diff --git a/molecule/upgrade/prepare.yml b/molecule/upgrade/prepare.yml index a7af60a13..e459eecce 100644 --- a/molecule/upgrade/prepare.yml +++ b/molecule/upgrade/prepare.yml @@ -4,19 +4,19 @@ pre_tasks: - name: Set repo if Alpine ansible.builtin.set_fact: - version: =1.25.1-r1 + version: =1.25.3-r1 when: ansible_facts['os_family'] == "Alpine" - name: Set repo if Debian ansible.builtin.set_fact: - version: =1.25.1-1~{{ ansible_facts['distribution_release'] }} + version: =1.25.3-1~{{ ansible_facts['distribution_release'] }} when: ansible_facts['os_family'] == "Debian" - name: Set repo if Red Hat ansible.builtin.set_fact: - version: -1.25.1-1.{{ (ansible_facts['distribution'] == "Amazon") | ternary('amzn2', ('el' + ansible_facts['distribution_major_version'] | string)) }}.ngx + version: -1.25.3-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.25.1-1.sles{{ ansible_facts['distribution_major_version'] }}.ngx + version: =1.25.3-1.sles{{ ansible_facts['distribution_major_version'] }}.ngx when: ansible_facts['os_family'] == "Suse" tasks: - name: Install NGINX diff --git a/molecule/version/converge.yml b/molecule/version/converge.yml index c57cfc69d..22929f70b 100644 --- a/molecule/version/converge.yml +++ b/molecule/version/converge.yml @@ -4,23 +4,23 @@ pre_tasks: - name: Set repo if Alpine ansible.builtin.set_fact: - ngx_version: =1.25.1-r1 - njs: =1.23.2.7.9-r1 + ngx_version: =1.25.3-r1 + njs: =1.25.3.0.8.2-r1 when: ansible_facts['os_family'] == "Alpine" - name: Set repo if Debian ansible.builtin.set_fact: - ngx_version: =1.25.1-1~{{ ansible_facts['distribution_release'] }} - njs_version: =1.25.1+0.7.12-1~{{ ansible_facts['distribution_release'] }} + ngx_version: =1.25.3-1~{{ ansible_facts['distribution_release'] }} + njs_version: =1.25.3+0.8.2-1~{{ ansible_facts['distribution_release'] }} when: ansible_facts['os_family'] == "Debian" - name: Set repo if Red Hat ansible.builtin.set_fact: - ngx_version: -1.25.1-1.{{ (ansible_facts['distribution'] == "Amazon") | ternary('amzn2', ('el' + ansible_facts['distribution_major_version'] | string)) }}.ngx - njs_version: -1.25.1+0.7.12-1.{{ (ansible_facts['distribution'] == "Amazon") | ternary('amzn2', ('el' + ansible_facts['distribution_major_version'] | string)) }}.ngx + ngx_version: -1.25.3-1.{{ (ansible_facts['distribution'] == "Amazon") | ternary('amzn2', ('el' + ansible_facts['distribution_major_version'] | string)) }}.ngx + njs_version: -1.25.3+0.8.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: - ngx_version: =1.25.1-1.sles{{ ansible_facts['distribution_major_version'] }}.ngx - njs_version: =1.25.1+0.7.12-1.sles{{ ansible_facts['distribution_major_version'] }}.ngx + ngx_version: =1.25.3-1.sles{{ ansible_facts['distribution_major_version'] }}.ngx + njs_version: =1.25.3+0.8.2-1.sles{{ ansible_facts['distribution_major_version'] }}.ngx when: ansible_facts['os_family'] == "Suse" tasks: - name: Install NGINX diff --git a/vars/main.yml b/vars/main.yml index 10e5dd68f..7efa8e72b 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -27,7 +27,7 @@ nginx_supported_distributions: architectures: [x86_64, aarch64, s390x] 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 From 6573a1701ce67d5b9cffeaba51fe86b29ea5b4af Mon Sep 17 00:00:00 2001 From: Alessandro Fael Garcia Date: Tue, 5 Mar 2024 16:04:25 +0100 Subject: [PATCH 3/7] fixes --- molecule/downgrade-plus/converge.yml | 4 ++++ molecule/downgrade/converge.yml | 4 ++++ molecule/version/converge.yml | 4 ++++ molecule/version/verify.yml | 2 +- 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/molecule/downgrade-plus/converge.yml b/molecule/downgrade-plus/converge.yml index 85e6f43ed..0238a8401 100644 --- a/molecule/downgrade-plus/converge.yml +++ b/molecule/downgrade-plus/converge.yml @@ -5,18 +5,22 @@ - name: Set repo if Alpine ansible.builtin.set_fact: version: =30-r1 + cacheable: true when: ansible_facts['os_family'] == "Alpine" - name: Set repo if Debian ansible.builtin.set_fact: version: =30-1~{{ ansible_facts['distribution_release'] }} + cacheable: true when: ansible_facts['os_family'] == "Debian" - name: Set repo if Red Hat ansible.builtin.set_fact: version: -30-1.{{ (ansible_facts['distribution'] == "Amazon") | ternary('amzn2', ('el' + ansible_facts['distribution_major_version'] | string)) }}.ngx + cacheable: true when: ansible_facts['os_family'] == "RedHat" - name: Set repo if SLES ansible.builtin.set_fact: version: =30-1.sles{{ ansible_facts['distribution_major_version'] }}.ngx + cacheable: true when: ansible_facts['os_family'] == "Suse" tasks: - name: Install NGINX diff --git a/molecule/downgrade/converge.yml b/molecule/downgrade/converge.yml index 7a38efc0a..c9f0a1ec6 100644 --- a/molecule/downgrade/converge.yml +++ b/molecule/downgrade/converge.yml @@ -5,18 +5,22 @@ - name: Set repo if Alpine ansible.builtin.set_fact: version: =1.25.3-r1 + cacheable: true when: ansible_facts['os_family'] == "Alpine" - name: Set repo if Debian ansible.builtin.set_fact: version: =1.25.3-1~{{ ansible_facts['distribution_release'] }} + cacheable: true when: ansible_facts['os_family'] == "Debian" - name: Set repo if Red Hat ansible.builtin.set_fact: version: -1.25.3-1.{{ (ansible_facts['distribution'] == "Amazon") | ternary('amzn2', ('el' + ansible_facts['distribution_major_version'] | string)) }}.ngx + cacheable: true when: ansible_facts['os_family'] == "RedHat" - name: Set repo if SLES ansible.builtin.set_fact: version: =1.25.3-1.sles{{ ansible_facts['distribution_major_version'] }}.ngx + cacheable: true when: ansible_facts['os_family'] == "Suse" tasks: - name: Install NGINX diff --git a/molecule/version/converge.yml b/molecule/version/converge.yml index 22929f70b..0d0e1eb03 100644 --- a/molecule/version/converge.yml +++ b/molecule/version/converge.yml @@ -6,21 +6,25 @@ ansible.builtin.set_fact: ngx_version: =1.25.3-r1 njs: =1.25.3.0.8.2-r1 + cacheable: true when: ansible_facts['os_family'] == "Alpine" - name: Set repo if Debian ansible.builtin.set_fact: ngx_version: =1.25.3-1~{{ ansible_facts['distribution_release'] }} njs_version: =1.25.3+0.8.2-1~{{ ansible_facts['distribution_release'] }} + cacheable: true when: ansible_facts['os_family'] == "Debian" - name: Set repo if Red Hat ansible.builtin.set_fact: ngx_version: -1.25.3-1.{{ (ansible_facts['distribution'] == "Amazon") | ternary('amzn2', ('el' + ansible_facts['distribution_major_version'] | string)) }}.ngx njs_version: -1.25.3+0.8.2-1.{{ (ansible_facts['distribution'] == "Amazon") | ternary('amzn2', ('el' + ansible_facts['distribution_major_version'] | string)) }}.ngx + cacheable: true when: ansible_facts['os_family'] == "RedHat" - name: Set repo if SLES ansible.builtin.set_fact: ngx_version: =1.25.3-1.sles{{ ansible_facts['distribution_major_version'] }}.ngx njs_version: =1.25.3+0.8.2-1.sles{{ ansible_facts['distribution_major_version'] }}.ngx + cacheable: true when: ansible_facts['os_family'] == "Suse" tasks: - name: Install NGINX diff --git a/molecule/version/verify.yml b/molecule/version/verify.yml index ab18f3d1d..966a0f6a2 100644 --- a/molecule/version/verify.yml +++ b/molecule/version/verify.yml @@ -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.25.1') + failed_when: version is not search(nginx_version | regex_search('([0-9]+\\.){2}[0-9]+')) From ac39ef4da235bf9201332c63436e3ce3fbc87a03 Mon Sep 17 00:00:00 2001 From: Alessandro Fael Garcia Date: Tue, 5 Mar 2024 16:57:48 +0100 Subject: [PATCH 4/7] fixes --- molecule/downgrade-plus/molecule.yml | 5 +++++ molecule/downgrade/molecule.yml | 6 ++++++ molecule/version/molecule.yml | 5 +++++ 3 files changed, 16 insertions(+) diff --git a/molecule/downgrade-plus/molecule.yml b/molecule/downgrade-plus/molecule.yml index 2da626035..f0fc4fe58 100644 --- a/molecule/downgrade-plus/molecule.yml +++ b/molecule/downgrade-plus/molecule.yml @@ -187,3 +187,8 @@ provisioner: prepare: prepare.yml converge: converge.yml verify: verify.yml + config_options: + defaults: + fact_caching: jsonfile + fact_caching_connection: /tmp/facts_cache + fact_caching_timeout: 7200 diff --git a/molecule/downgrade/molecule.yml b/molecule/downgrade/molecule.yml index 0ef6fbdff..06dd29479 100644 --- a/molecule/downgrade/molecule.yml +++ b/molecule/downgrade/molecule.yml @@ -196,3 +196,9 @@ provisioner: prepare: prepare.yml converge: converge.yml verify: verify.yml + config_options: + defaults: + fact_caching: jsonfile + fact_caching_connection: /tmp/facts_cache + fact_caching_timeout: 7200 + diff --git a/molecule/version/molecule.yml b/molecule/version/molecule.yml index 187189455..4cdba5aa8 100644 --- a/molecule/version/molecule.yml +++ b/molecule/version/molecule.yml @@ -195,3 +195,8 @@ provisioner: playbooks: converge: converge.yml verify: verify.yml + config_options: + defaults: + fact_caching: jsonfile + fact_caching_connection: /tmp/facts_cache + fact_caching_timeout: 7200 From 5fb2b70420b564e682e7cf4d3b418ac1ba6cdff7 Mon Sep 17 00:00:00 2001 From: Alessandro Fael Garcia Date: Tue, 5 Mar 2024 16:58:34 +0100 Subject: [PATCH 5/7] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 97409cdf3..4efc5387c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,7 +20,7 @@ CI/CD: - Add Molecule tests for NGINX Amplify. - Update the RHEL based tests to use the latest UBI release. -- Use the local role name (`ansible-role-nginx`) instead of the fully qualified role name (`nginxinc.nginx`) in Molecule to ensure tests always work as intended in environments where the role has been already installed beforehand. +- Use the local role name (`ansible-role-nginx`) instead of the fully qualified role name (`nginxinc.nginx`) in Molecule to ensure tests always work as intended in environments where the role has been already installed beforehand. ## 0.24.2 (October 3rd, 2023) From 1490ba5c231c37d02a2f0521ef98ac3465172a08 Mon Sep 17 00:00:00 2001 From: Alessandro Fael Garcia Date: Tue, 5 Mar 2024 17:05:53 +0100 Subject: [PATCH 6/7] Update molecule.yml --- molecule/downgrade/molecule.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/molecule/downgrade/molecule.yml b/molecule/downgrade/molecule.yml index 06dd29479..6127635b8 100644 --- a/molecule/downgrade/molecule.yml +++ b/molecule/downgrade/molecule.yml @@ -201,4 +201,3 @@ provisioner: fact_caching: jsonfile fact_caching_connection: /tmp/facts_cache fact_caching_timeout: 7200 - From ebe9d4d040a9a2c2afc908e3d65c07a318b46bbe Mon Sep 17 00:00:00 2001 From: Alessandro Fael Garcia Date: Wed, 6 Mar 2024 21:02:37 +0100 Subject: [PATCH 7/7] fix --- molecule/downgrade-plus/verify.yml | 4 ++-- molecule/downgrade/verify.yml | 4 ++-- molecule/version/converge.yml | 2 +- molecule/version/verify.yml | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/molecule/downgrade-plus/verify.yml b/molecule/downgrade-plus/verify.yml index 0be5fec5d..399b780fc 100644 --- a/molecule/downgrade-plus/verify.yml +++ b/molecule/downgrade-plus/verify.yml @@ -29,5 +29,5 @@ args: chdir: "{{ ((ansible_facts['system'] | lower is not search('bsd')) | ternary('/etc/nginx', '/usr/local/sbin')) }}" changed_when: false - register: version_check - failed_when: version_check is not search(version['content'] | regex_search('[0-9]+')) + register: current_version + failed_when: current_version is not search(version | regex_search('[0-9]+')) diff --git a/molecule/downgrade/verify.yml b/molecule/downgrade/verify.yml index 6e75bebf3..49d865bd7 100644 --- a/molecule/downgrade/verify.yml +++ b/molecule/downgrade/verify.yml @@ -29,5 +29,5 @@ 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(nginx_version | regex_search('([0-9]+\\.){2}[0-9]+')) + register: current_version + failed_when: current_version is not search(version | regex_search('([0-9]+\\.){2}[0-9]+')) diff --git a/molecule/version/converge.yml b/molecule/version/converge.yml index 0d0e1eb03..4ef2641ee 100644 --- a/molecule/version/converge.yml +++ b/molecule/version/converge.yml @@ -5,7 +5,7 @@ - name: Set repo if Alpine ansible.builtin.set_fact: ngx_version: =1.25.3-r1 - njs: =1.25.3.0.8.2-r1 + njs_version: =1.25.3.0.8.2-r1 cacheable: true when: ansible_facts['os_family'] == "Alpine" - name: Set repo if Debian diff --git a/molecule/version/verify.yml b/molecule/version/verify.yml index 966a0f6a2..9d258502c 100644 --- a/molecule/version/verify.yml +++ b/molecule/version/verify.yml @@ -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(nginx_version | regex_search('([0-9]+\\.){2}[0-9]+')) + failed_when: version is not search(ngx_version | regex_search('([0-9]+\\.){2}[0-9]+'))