|
7 | 7 | - '"geoip" in nginx_modules'
|
8 | 8 | - nginx_install_epel_release | bool
|
9 | 9 |
|
10 |
| -- name: (RHEL 7) Install GeoIP2 dependency |
| 10 | +- name: (Amazon Linux 2/RHEL 7) Install GeoIP2 dependency |
11 | 11 | when:
|
12 |
| - - ansible_facts['distribution'] == "RedHat" |
| 12 | + - ansible_facts['distribution'] == "RedHat" or ansible_facts['distribution'] == "Amazon" |
13 | 13 | - ansible_facts['distribution_major_version'] is version('7', '==')
|
14 | 14 | - '"geoip2" in nginx_modules'
|
15 | 15 | block:
|
16 |
| - - name: (RHEL 7) Check if libmaxminddb is available |
| 16 | + - name: (Amazon Linux 2/RHEL 7) Check if libmaxminddb is available |
17 | 17 | ansible.builtin.yum:
|
18 | 18 | list: available
|
19 | 19 | register: packages
|
20 | 20 |
|
21 |
| - - name: (RHEL 7) Install libmaxminddb |
| 21 | + - name: (Amazon Linux 2/RHEL 7) Install libmaxminddb |
22 | 22 | ansible.builtin.yum:
|
23 | 23 | name: https://rpmfind.net/linux/centos/7.9.2009/os/x86_64/Packages/libmaxminddb-1.2.0-6.el7.x86_64.rpm
|
24 | 24 | when: '"libmaxminddb" not in packages.results'
|
25 | 25 |
|
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 |
27 | 27 | when:
|
28 |
| - - ansible_facts['os_family'] == "RedHat" and ansible_facts['distribution'] != "Amazon" |
| 28 | + - ansible_facts['os_family'] == "RedHat" |
29 | 29 | - (ansible_facts['distribution_major_version'] is version('7', '==') and '"geoip2" in nginx_modules')
|
30 | 30 | or '"opentracing" in nginx_modules'
|
31 | 31 | - nginx_install_epel_release | bool
|
32 | 32 | block:
|
33 |
| - - name: (RHEL) Import EPEL GPG key |
| 33 | + - name: (AlmaLinux/Amazon Linux 2/Oracle Linux/RHEL) Import EPEL GPG key |
34 | 34 | ansible.builtin.rpm_key:
|
35 | 35 | state: present
|
36 | 36 | key: https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-{{ ansible_facts['distribution_major_version'] }}
|
37 | 37 |
|
38 |
| - - name: (RHEL) Install EPEL |
| 38 | + - name: (AlmaLinux/Amazon Linux 2/Oracle Linux/RHEL) Install EPEL |
39 | 39 | ansible.builtin.yum:
|
40 | 40 | name: https://dl.fedoraproject.org/pub/epel/epel-release-latest-{{ ansible_facts['distribution_major_version'] }}.noarch.rpm
|
41 | 41 |
|
|
0 commit comments