2018-08-02 21:51:45 +02:00
---
2022-03-17 23:50:41 +01:00
- name : (CentOS) Install GeoIP EPEL dependencies
2022-03-22 18:27:11 +01:00
ansible.builtin.yum :
2020-09-08 00:44:54 +02:00
name : epel-release
2019-11-26 22:12:09 +01:00
when :
2020-09-15 21:27:06 +02:00
- ansible_facts['distribution'] == "CentOS"
2020-09-08 00:44:54 +02:00
- '"geoip" in nginx_modules'
2021-06-14 13:13:58 +02:00
- nginx_install_epel_release | bool
2022-03-17 23:50:41 +01:00
- name : (RHEL) Install GeoIP2 and/or OpenTracing EPEL dependencies
block :
- name : (RHEL) Import EPEL GPG key
2022-03-22 18:27:11 +01:00
ansible.builtin.rpm_key :
2022-03-17 23:50:41 +01:00
state : present
key : https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-{{ ansible_facts['distribution_major_version'] }}
- name : (RHEL) Install package dependencies
2022-03-22 18:27:11 +01:00
ansible.builtin.yum :
2022-03-17 23:50:41 +01:00
name : https://dl.fedoraproject.org/pub/epel/epel-release-latest-{{ ansible_facts['distribution_major_version'] }}.noarch.rpm
when :
- ansible_facts['distribution'] == "RedHat"
- (ansible_facts['distribution_major_version'] == 7 and '"geoip2" in nginx_modules')
or '"opentracing" in nginx_modules'
- nginx_install_epel_release | bool
2018-08-02 21:51:45 +02:00
2021-12-07 02:47:13 +01:00
- name : Setup NGINX modules
2022-03-22 18:27:11 +01:00
ansible.builtin.package :
2020-11-12 13:29:20 +01:00
name : "nginx-{{ (nginx_type == 'plus') | ternary('plus-', '') }}module-{{ item.name | default(item) }}\
2021-12-03 07:59:36 +01:00
{{ item.version | default(nginx_version) | default('') }}{{ (nginx_repository is not defined and ansible_facts['os_family'] == 'Alpine' and nginx_type != 'plus') | ternary('@nginx', '') }}"
2020-11-12 13:29:20 +01:00
state : "{{ item.state | default('present') }}"
2020-09-08 00:44:54 +02:00
loop : "{{ nginx_modules }}"
2019-11-26 22:12:09 +01:00
when :
2020-11-12 13:29:20 +01:00
- (item.name | default(item) in nginx_modules_list and nginx_type == 'opensource')
or (item.name | default(item) in nginx_plus_modules_list and nginx_type == 'plus')
- not (item.name | default(item) == "auth-spnego")
2020-09-15 21:27:06 +02:00
or not (ansible_facts['os_family'] == "Alpine" and (ansible_facts['distribution_version'] | regex_search('^[0-9]+\\.[0-9]+') is version('3.8', '==')))
2020-11-12 13:29:20 +01:00
- not (item.name | default(item) == "brotli")
2020-09-15 21:27:06 +02:00
or not ((ansible_facts['os_family'] == "Alpine")
or (ansible_facts['distribution'] == "Amazon")
2022-02-15 18:49:40 +01:00
or (ansible_facts['os_family'] == "Debian" and ansible_facts['distribution_major_version'] is version('9', '=='))
or (ansible_facts['distribution'] == "OracleLinux")
or (ansible_facts['os_family'] == "RedHat" and ansible_facts['distribution_major_version'] is version('8', '<'))
or (ansible_facts['os_family'] == "Suse" and ansible_facts['distribution_major_version'] is version('12', '<')))
- not (item.name | default(item) == "geoip")
or not ((ansible_facts['os_family'] == "FreeBSD")
or (ansible_facts['os_family'] == "RedHat" and ansible_facts['distribution_major_version'] is version('8', '==')))
- not (item.name | default(item) == "geoip2")
or not ((ansible_facts['distribution'] == 'Amazon')
or (ansible_facts['os_family'] == "Suse"))
2020-11-12 13:29:20 +01:00
- not (item.name | default(item) == "opentracing")
2022-02-15 18:49:40 +01:00
or not ((ansible_facts['distribution'] == 'Amazon')
or (ansible_facts['os_family'] == "Suse" and ansible_facts['distribution_major_version'] is version('12', '==')))