Skip to content

Commit c6dfbea

Browse files
committed
Update install-modules.yml
1 parent 27b0d9a commit c6dfbea

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

tasks/modules/install-modules.yml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99

1010
- name: (Amazon Linux 2/RHEL 7) Install GeoIP2 dependency
1111
when:
12-
- ansible_facts['distribution'] == "RedHat" or ansible_facts['distribution'] == "Amazon"
13-
- ansible_facts['distribution_major_version'] is version('7', '==')
12+
- (ansible_facts['distribution'] == "RedHat" and ansible_facts['distribution_major_version'] is version('7', '=='))
13+
or ansible_facts['distribution'] == "Amazon"
1414
- '"geoip2" in nginx_modules'
1515
block:
1616
- name: (Amazon Linux 2/RHEL 7) Check if libmaxminddb is available
@@ -23,21 +23,20 @@
2323
name: https://rpmfind.net/linux/centos/7.9.2009/os/x86_64/Packages/libmaxminddb-1.2.0-6.el7.x86_64.rpm
2424
when: '"libmaxminddb" not in packages.results'
2525

26-
- name: (AlmaLinux/Amazon Linux 2/Oracle Linux/RHEL) Install GeoIP2 and/or OpenTracing EPEL dependency
26+
- name: (AlmaLinux/Amazon Linux 2/Oracle Linux/RHEL/Rocky Linux) Install GeoIP2 and/or OpenTracing EPEL dependency
2727
when:
2828
- ansible_facts['os_family'] == "RedHat"
29-
- (ansible_facts['distribution_major_version'] is version('7', '==') and '"geoip2" in nginx_modules')
30-
or '"opentracing" in nginx_modules'
29+
- ('"geoip2" in nginx_modules') or ('"opentracing" in nginx_modules')
3130
- nginx_install_epel_release | bool
3231
block:
33-
- name: (AlmaLinux/Amazon Linux 2/Oracle Linux/RHEL) Import EPEL GPG key
32+
- name: (AlmaLinux/Amazon Linux 2/Oracle Linux/RHEL/Rocky Linux) Import EPEL GPG key
3433
ansible.builtin.rpm_key:
3534
state: present
36-
key: https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7
35+
key: https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-{{ ((ansible_facts['distribution'] == 'Amazon') | ternary('7', ansible_facts['distribution_major_version'])) }}
3736

38-
- name: (AlmaLinux/Amazon Linux 2/Oracle Linux/RHEL) Install EPEL
37+
- name: (AlmaLinux/Amazon Linux 2/Oracle Linux/RHEL/Rocky Linux) Install EPEL
3938
ansible.builtin.yum:
40-
name: https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
39+
name: https://dl.fedoraproject.org/pub/epel/epel-release-latest-{{ ((ansible_facts['distribution'] == 'Amazon') | ternary('7', ansible_facts['distribution_major_version'])) }}.noarch.rpm
4140

4241
- name: (Alpine Linux) Install Lua and Encrypted Sessions Alpine Linux 3.17 dependency
4342
community.general.apk:

0 commit comments

Comments
 (0)