Skip to content

Commit 6a0e0fc

Browse files
authored
chore: Remove unnecessary task when installing modules on Alpine Linux (#757)
1 parent 822267f commit 6a0e0fc

File tree

2 files changed

+22
-17
lines changed

2 files changed

+22
-17
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ TESTS:
2525

2626
- Update RHEL UBI images to UBI 8.10 and UBI 9.4.
2727

28+
MAINTENANCE:
29+
30+
- Installing certain NGINX modules on Alpine Linux 3.17 no longer requires installing `nginx-plus-module-ndk` as a separate step.
31+
2832
CI/CD:
2933

3034
- Update GitHub Actions to Ubuntu 24.04.

tasks/modules/install-modules.yml

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,29 @@
11
---
2-
- name: (AlmaLinux/Amazon Linux/Oracle Linux/RHEL/Rocky Linux) Install GeoIP2 and/or OpenTracing EPEL dependency
2+
- name: (AlmaLinux/Amazon Linux/Oracle Linux/RHEL/Rocky Linux) Install OpenTracing EPEL dependency
33
when:
44
- ansible_facts['os_family'] == "RedHat"
5-
- not (ansible_facts['distribution'] == "Amazon" and ansible_facts['distribution_major_version'] is version('2023', '=='))
65
- ('opentracing' in nginx_modules)
76
- nginx_install_epel_release | bool
87
block:
9-
- name: (AlmaLinux/Amazon Linux/Oracle Linux/RHEL/Rocky Linux) Import EPEL GPG key
10-
ansible.builtin.rpm_key:
11-
state: present
12-
key: https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-{{ ((ansible_facts['distribution'] == 'Amazon') | ternary('7', ansible_facts['distribution_major_version'])) }}
8+
- name: (AlmaLinux/Amazon Linux/Oracle Linux/RHEL/Rocky Linux) Install EPEL dependency
9+
when: ansible_facts['distribution'] != "Amazon"
10+
block:
11+
- name: (AlmaLinux/Oracle Linux/RHEL/Rocky Linux) Import EPEL GPG key
12+
ansible.builtin.rpm_key:
13+
state: present
14+
key: https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-{{ ansible_facts['distribution_major_version'] }}
1315

14-
- name: (AlmaLinux/Amazon Linux/Oracle Linux/RHEL/Rocky Linux) Install EPEL
15-
ansible.builtin.yum:
16-
name: https://dl.fedoraproject.org/pub/epel/epel-release-latest-{{ ((ansible_facts['distribution'] == 'Amazon') | ternary('7', ansible_facts['distribution_major_version'])) }}.noarch.rpm
16+
- name: (AlmaLinux/Oracle Linux/RHEL/Rocky Linux) Install EPEL
17+
ansible.builtin.yum:
18+
name: https://dl.fedoraproject.org/pub/epel/epel-release-latest-{{ ansible_facts['distribution_major_version'] }}.noarch.rpm
1719

18-
- name: (Alpine Linux) Install Lua and Encrypted Sessions Alpine Linux 3.17 dependency
19-
community.general.apk:
20-
name: nginx-plus-module-ndk
21-
when:
22-
- nginx_type == 'plus'
23-
- ansible_facts['os_family'] == 'Alpine'
24-
- ansible_facts['distribution_version'] | regex_search('^[0-9]+\\.[0-9]+') is version('3.17', '==')
25-
- ('encrypted-sessions' in nginx_modules) or ('lua' in nginx_modules) or ('set-misc' in nginx_modules)
20+
- name: (Amazon Linux) Install EPEL
21+
ansible.builtin.command:
22+
cmd: amazon-linux-extras install -y epel
23+
creates: /etc/yum.repos.d/epel.repo
24+
when:
25+
- ansible_facts['distribution'] == "Amazon"
26+
- ansible_facts['distribution_major_version'] is version('2', '==')
2627

2728
- name: Install NGINX modules
2829
ansible.builtin.package:

0 commit comments

Comments
 (0)