Skip to content

Commit

Permalink
Use local role name in Molecule tests (#409)
Browse files Browse the repository at this point in the history
* And update the platforms used in the various Molecule scenarios.
  • Loading branch information
alessfg authored Mar 6, 2024
1 parent db4d8b5 commit 2651dcb
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 15 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ BUG FIXES:

- Fix incompatibility when using the `listen` directive and setting both the `quic` and `so_keepalive` parameters.

CI/CD:

- Update the platforms used in the various Molecule scenarios.
- Use the local role name (`ansible-role-nginx-config`) instead of the fully qualified role name (`nginxinc.nginx_config`) in Molecule to ensure tests always work as intended in environments where the role has been already installed beforehand.

## 0.7.1 (October 3rd, 2023)

ENHANCEMENTS:
Expand Down
2 changes: 1 addition & 1 deletion molecule/cleanup_module/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
tasks:
- name: Configure NGINX
ansible.builtin.include_role:
name: nginxinc.nginx_config
name: ansible-role-nginx-config
vars:
nginx_config_debug_output: true

Expand Down
6 changes: 3 additions & 3 deletions molecule/cleanup_module/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ lint: |
set -e
ansible-lint --force-color
platforms:
- name: alpine-3.17
image: alpine:3.17
- name: alpine-3.19
image: alpine:3.19
dockerfile: ../common/Dockerfile.j2
privileged: true
cgroupns_mode: host
Expand All @@ -26,7 +26,7 @@ platforms:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
command: /sbin/init
- name: rhel-9
image: redhat/ubi9:9.1.0
image: redhat/ubi9:9.3
dockerfile: ../common/Dockerfile.j2
privileged: true
cgroupns_mode: host
Expand Down
2 changes: 1 addition & 1 deletion molecule/default/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
tasks:
- name: Configure NGINX
ansible.builtin.include_role:
name: nginxinc.nginx_config
name: ansible-role-nginx-config
vars:
nginx_config_debug_output: true

Expand Down
6 changes: 3 additions & 3 deletions molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ lint: |
set -e
ansible-lint --force-color
platforms:
- name: alpine-3.17
image: alpine:3.17
- name: alpine-3.19
image: alpine:3.19
dockerfile: ../common/Dockerfile.j2
privileged: true
cgroupns_mode: host
Expand All @@ -26,7 +26,7 @@ platforms:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
command: /sbin/init
- name: rhel-9
image: redhat/ubi9:9.1.0
image: redhat/ubi9:9.3
dockerfile: ../common/Dockerfile.j2
privileged: true
cgroupns_mode: host
Expand Down
2 changes: 1 addition & 1 deletion molecule/plus/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
tasks:
- name: Configure NGINX
ansible.builtin.include_role:
name: nginxinc.nginx_config
name: ansible-role-nginx-config
vars:
nginx_config_debug_output: true

Expand Down
4 changes: 2 additions & 2 deletions molecule/plus/prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: ../common/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: ../common/files/license/nginx-repo.key
Expand Down
2 changes: 1 addition & 1 deletion molecule/push/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
tasks:
- name: Configure NGINX
ansible.builtin.include_role:
name: nginxinc.nginx_config
name: ansible-role-nginx-config
vars:
nginx_config_debug_output: true

Expand Down
6 changes: 3 additions & 3 deletions molecule/push/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ lint: |
set -e
ansible-lint --force-color
platforms:
- name: alpine-3.17
image: alpine:3.17
- name: alpine-3.19
image: alpine:3.19
dockerfile: ../common/Dockerfile.j2
privileged: true
cgroupns_mode: host
Expand All @@ -26,7 +26,7 @@ platforms:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
command: /sbin/init
- name: rhel-9
image: redhat/ubi9:9.1.0
image: redhat/ubi9:9.3
dockerfile: ../common/Dockerfile.j2
privileged: true
cgroupns_mode: host
Expand Down

0 comments on commit 2651dcb

Please sign in to comment.