2018-08-02 21:51:45 +02:00
|
|
|
---
|
2020-09-15 21:27:06 +02:00
|
|
|
- name: "(CentOS) Install GeoIP dependencies"
|
2020-09-08 00:44:54 +02:00
|
|
|
yum:
|
|
|
|
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'
|
2018-08-02 21:51:45 +02:00
|
|
|
|
2020-09-15 21:27:06 +02:00
|
|
|
- name: "Install NGINX Modules"
|
2020-09-08 00:44:54 +02:00
|
|
|
package:
|
|
|
|
name: "nginx-{{ (nginx_type == 'plus') | ternary('plus-', '') }}module-{{ item }}{{ nginx_version | default('') }}"
|
|
|
|
state: present
|
|
|
|
loop: "{{ nginx_modules }}"
|
2019-11-26 22:12:09 +01:00
|
|
|
when:
|
2020-09-08 00:44:54 +02:00
|
|
|
- (item in nginx_modules_list and nginx_type == 'opensource')
|
|
|
|
or (item in nginx_plus_modules_list and nginx_type == 'plus')
|
|
|
|
- not (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-09-08 00:44:54 +02:00
|
|
|
- not (item == "geoip")
|
2020-09-15 21:27:06 +02:00
|
|
|
or not ((ansible_facts['os_family'] == "RedHat" and ansible_facts['distribution_major_version'] is version('8', '=='))
|
|
|
|
or (ansible_facts['os_family'] == "FreeBSD"))
|
2020-09-08 00:44:54 +02:00
|
|
|
- not (item == "brotli")
|
2020-09-15 21:27:06 +02:00
|
|
|
or not ((ansible_facts['os_family'] == "Alpine")
|
|
|
|
or (ansible_facts['os_family'] == "RedHat" and ansible_facts['distribution_major_version'] is version('8', '<'))
|
|
|
|
or (ansible_facts['os_family'] == "Debian" and ansible_facts['distribution_major_version'] is version('9', '=='))
|
|
|
|
or (ansible_facts['os_family'] == "Suse" and ansible_facts['distribution_major_version'] is version('12', '<'))
|
|
|
|
or (ansible_facts['distribution'] == "Amazon")
|
|
|
|
or (ansible_facts['distribution'] == "OracleLinux"))
|
|
|
|
- not (item == "geoip2") or not (ansible_facts['os_family'] == "Suse")
|
2020-09-08 00:44:54 +02:00
|
|
|
- not (item == "opentracing")
|
2020-09-15 21:27:06 +02:00
|
|
|
or not ((ansible_facts['os_family'] == "Suse" and ansible_facts['distribution_major_version'] is version('12', '=='))
|
|
|
|
or (ansible_facts['os_family'] == "RedHat" and ansible_facts['distribution_major_version'] is version('6', '==')))
|