|
9 | 9 |
|
10 | 10 | - name: (Amazon Linux 2/RHEL 7) Install GeoIP2 dependency
|
11 | 11 | 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" |
14 | 14 | - '"geoip2" in nginx_modules'
|
15 | 15 | block:
|
16 | 16 | - name: (Amazon Linux 2/RHEL 7) Check if libmaxminddb is available
|
|
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/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 |
27 | 27 | when:
|
28 | 28 | - 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') |
31 | 30 | - nginx_install_epel_release | bool
|
32 | 31 | 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 |
34 | 33 | ansible.builtin.rpm_key:
|
35 | 34 | 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'])) }} |
37 | 36 |
|
38 |
| - - name: (AlmaLinux/Amazon Linux 2/Oracle Linux/RHEL) Install EPEL |
| 37 | + - name: (AlmaLinux/Amazon Linux 2/Oracle Linux/RHEL/Rocky Linux) Install EPEL |
39 | 38 | 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 |
41 | 40 |
|
42 | 41 | - name: (Alpine Linux) Install Lua and Encrypted Sessions Alpine Linux 3.17 dependency
|
43 | 42 | community.general.apk:
|
|
0 commit comments