Skip to content

Commit 42b792d

Browse files
committed
Update install-modules.yml
1 parent 63a95d0 commit 42b792d

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

tasks/modules/install-modules.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,35 +7,35 @@
77
- '"geoip" in nginx_modules'
88
- nginx_install_epel_release | bool
99

10-
- name: (RHEL 7) Install GeoIP2 dependency
10+
- name: (Amazon Linux 2/RHEL 7) Install GeoIP2 dependency
1111
when:
12-
- ansible_facts['distribution'] == "RedHat"
12+
- ansible_facts['distribution'] == "RedHat" or ansible_facts['distribution'] == "Amazon"
1313
- ansible_facts['distribution_major_version'] is version('7', '==')
1414
- '"geoip2" in nginx_modules'
1515
block:
16-
- name: (RHEL 7) Check if libmaxminddb is available
16+
- name: (Amazon Linux 2/RHEL 7) Check if libmaxminddb is available
1717
ansible.builtin.yum:
1818
list: available
1919
register: packages
2020

21-
- name: (RHEL 7) Install libmaxminddb
21+
- name: (Amazon Linux 2/RHEL 7) Install libmaxminddb
2222
ansible.builtin.yum:
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/Oracle Linux/RHEL) Install GeoIP2 and/or OpenTracing EPEL dependency
26+
- name: (AlmaLinux/Amazon Linux 2/Oracle Linux/RHEL) Install GeoIP2 and/or OpenTracing EPEL dependency
2727
when:
28-
- ansible_facts['os_family'] == "RedHat" and ansible_facts['distribution'] != "Amazon"
28+
- ansible_facts['os_family'] == "RedHat"
2929
- (ansible_facts['distribution_major_version'] is version('7', '==') and '"geoip2" in nginx_modules')
3030
or '"opentracing" in nginx_modules'
3131
- nginx_install_epel_release | bool
3232
block:
33-
- name: (RHEL) Import EPEL GPG key
33+
- name: (AlmaLinux/Amazon Linux 2/Oracle Linux/RHEL) Import EPEL GPG key
3434
ansible.builtin.rpm_key:
3535
state: present
3636
key: https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-{{ ansible_facts['distribution_major_version'] }}
3737

38-
- name: (RHEL) Install EPEL
38+
- name: (AlmaLinux/Amazon Linux 2/Oracle Linux/RHEL) Install EPEL
3939
ansible.builtin.yum:
4040
name: https://dl.fedoraproject.org/pub/epel/epel-release-latest-{{ ansible_facts['distribution_major_version'] }}.noarch.rpm
4141

0 commit comments

Comments
 (0)