|
21 | 21 | - name: (Amazon Linux/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 |
| - when: '"libmaxminddb" not in packages.results' |
| 24 | + when: "'libmaxminddb' not in packages['results']" |
25 | 25 |
|
26 | 26 | - name: (AlmaLinux/Amazon Linux/Oracle Linux/RHEL/Rocky Linux) Install GeoIP2 and/or OpenTracing EPEL dependency
|
27 | 27 | when:
|
28 | 28 | - ansible_facts['os_family'] == "RedHat"
|
29 |
| - - ('"opentracing" in nginx_modules') |
| 29 | + - ('opentracing' in nginx_modules) |
30 | 30 | - nginx_install_epel_release | bool
|
31 | 31 | block:
|
32 | 32 | - name: (AlmaLinux/Amazon Linux/Oracle Linux/RHEL/Rocky Linux) Import EPEL GPG key
|
|
43 | 43 | name: nginx-plus-module-ndk
|
44 | 44 | when:
|
45 | 45 | - nginx_type == 'plus'
|
46 |
| - - ansible_facts['os_family'] == "Alpine" |
| 46 | + - ansible_facts['os_family'] == 'Alpine' |
47 | 47 | - ansible_facts['distribution_version'] | regex_search('^[0-9]+\\.[0-9]+') is version('3.17', '==')
|
48 |
| - - ('"encrypted-sessions" in nginx_modules') or ('"lua" in nginx_modules') or ('"set-misc" in nginx_modules') |
| 48 | + - ('encrypted-sessions' in nginx_modules) or ('lua' in nginx_modules) or ('set-misc' in nginx_modules) |
49 | 49 |
|
50 | 50 | - name: Install NGINX modules
|
51 | 51 | ansible.builtin.package:
|
52 |
| - name: "nginx-{{ (nginx_type == 'plus') | ternary('plus-', '') }}module-{{ item.name | default(item) }}\ |
53 |
| - {{ (nginx_repository is not defined and ansible_facts['os_family'] == 'Alpine' and nginx_type != 'plus') | ternary('@nginx', '') }}{{ item.version | default('') }}" |
54 |
| - state: "{{ item.state | default('present') }}" |
| 52 | + name: "nginx-{{ (nginx_type == 'plus') | ternary('plus-', '') }}module-{{ item['name'] | default(item) }}\ |
| 53 | + {{ (nginx_repository is not defined and ansible_facts['os_family'] == 'Alpine' and nginx_type != 'plus') | ternary('@nginx', '') }}{{ item['version'] | default('') }}" |
| 54 | + state: "{{ item['state'] | default('present') }}" |
55 | 55 | loop: "{{ nginx_modules }}"
|
56 | 56 | when:
|
57 |
| - - (item.name | default(item) in nginx_modules_list and nginx_type == 'opensource') |
58 |
| - or (item.name | default(item) in nginx_plus_modules_list and nginx_type == 'plus') |
59 |
| - - not (item.name | default(item) == "brotli") |
60 |
| - or not (ansible_facts['os_family'] == "Suse" and ansible_facts['distribution_major_version'] is version('12', '==')) |
61 |
| - - not (item.name | default(item) == "geoip") |
62 |
| - or not ((ansible_facts['os_family'] == "FreeBSD") |
63 |
| - or (ansible_facts['os_family'] == "RedHat" and ansible_facts['distribution_major_version'] is version('8', '>='))) |
64 |
| - - not (item.name | default(item) == "geoip2") |
65 |
| - or not (ansible_facts['os_family'] == "Suse") |
66 |
| - - not (item.name | default(item) == "lua") |
67 |
| - or not (ansible_facts['architecture'] == "s390x") |
68 |
| - - not (item.name | default(item) == "opentracing") |
69 |
| - or not (ansible_facts['os_family'] == "Suse" and ansible_facts['distribution_major_version'] is version('12', '==')) |
| 57 | + - (item['name'] | default(item) in nginx_modules_list and nginx_type == 'opensource') |
| 58 | + or (item['name'] | default(item) in nginx_plus_modules_list and nginx_type == 'plus') |
| 59 | + - not (item['name'] | default(item) == 'brotli') |
| 60 | + or not (ansible_facts['os_family'] == 'Suse' and ansible_facts['distribution_major_version'] is version('12', '==')) |
| 61 | + - not (item['name'] | default(item) == "geoip") |
| 62 | + or not ((ansible_facts['os_family'] == 'FreeBSD') |
| 63 | + or (ansible_facts['os_family'] == 'RedHat' and ansible_facts['distribution_major_version'] is version('8', '>='))) |
| 64 | + - not (item['name'] | default(item) == 'geoip2') |
| 65 | + or not (ansible_facts['os_family'] == 'Suse') |
| 66 | + - not (item['name'] | default(item) == 'lua') |
| 67 | + or not (ansible_facts['architecture'] == 's390x') |
| 68 | + - not (item['name'] | default(item) == 'opentracing') |
| 69 | + or not (ansible_facts['os_family'] == 'Suse' and ansible_facts['distribution_major_version'] is version('12', '==')) |
0 commit comments