diff --git a/CHANGELOG.md b/CHANGELOG.md index 16277b3ee..4efc5387c 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,7 +19,8 @@ BUG FIXES: CI/CD: - Add Molecule tests for NGINX Amplify. -- 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. +- 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/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-plus/molecule.yml b/molecule/downgrade-plus/molecule.yml index 782a2d7d5..f0fc4fe58 100644 --- a/molecule/downgrade-plus/molecule.yml +++ b/molecule/downgrade-plus/molecule.yml @@ -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 @@ -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-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..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 - failed_when: version is not search('30') + register: current_version + failed_when: current_version is not search(version | regex_search('[0-9]+')) diff --git a/molecule/downgrade/converge.yml b/molecule/downgrade/converge.yml index 69c25dc0e..c9f0a1ec6 100644 --- a/molecule/downgrade/converge.yml +++ b/molecule/downgrade/converge.yml @@ -4,19 +4,23 @@ pre_tasks: - name: Set repo if Alpine ansible.builtin.set_fact: - version: =1.25.1-r1 + 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.1-1~{{ ansible_facts['distribution_release'] }} + 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.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 + cacheable: true 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 + cacheable: true when: ansible_facts['os_family'] == "Suse" tasks: - name: Install NGINX diff --git a/molecule/downgrade/molecule.yml b/molecule/downgrade/molecule.yml index 45cd5fddc..6127635b8 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 @@ -196,3 +196,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/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..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('1.25.1') + register: current_version + failed_when: current_version is not search(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..2da626035 100644 --- a/molecule/upgrade-plus/molecule.yml +++ b/molecule/upgrade-plus/molecule.yml @@ -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..e459eecce 100644 --- a/molecule/upgrade/prepare.yml +++ b/molecule/upgrade/prepare.yml @@ -4,23 +4,23 @@ 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 ansible.builtin.include_role: - name: nginxinc.nginx + name: ansible-role-nginx vars: nginx_version: "{{ version }}" diff --git a/molecule/version/converge.yml b/molecule/version/converge.yml index c57cfc69d..4ef2641ee 100644 --- a/molecule/version/converge.yml +++ b/molecule/version/converge.yml @@ -4,23 +4,27 @@ 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_version: =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.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'] }} + cacheable: true 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 + cacheable: true 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 + cacheable: true when: ansible_facts['os_family'] == "Suse" tasks: - name: Install NGINX diff --git a/molecule/version/molecule.yml b/molecule/version/molecule.yml index 4ef787321..4cdba5aa8 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 @@ -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 diff --git a/molecule/version/verify.yml b/molecule/version/verify.yml index ab18f3d1d..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('1.25.1') + failed_when: version is not search(ngx_version | regex_search('([0-9]+\\.){2}[0-9]+')) 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