ansible-role-nginx/tasks/modules/install-modules.yml

33 lines
1.5 KiB
YAML
Raw Normal View History

---
2020-09-08 00:44:54 +02:00
- name: "(Install: CentOS) Install GeoIP Required CentOS Dependencies"
yum:
name: epel-release
when:
2020-09-08 00:44:54 +02:00
- ansible_distribution == "CentOS"
- '"geoip" in nginx_modules'
2020-09-08 00:44:54 +02:00
- name: "(Install: All OSs) Install NGINX Modules"
package:
name: "nginx-{{ (nginx_type == 'plus') | ternary('plus-', '') }}module-{{ item }}{{ nginx_version | default('') }}"
state: present
loop: "{{ nginx_modules }}"
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")
or not (ansible_os_family == "Alpine" and (ansible_distribution_version | regex_search('^[0-9]+\\.[0-9]+') == "3.8"))
- not (item == "geoip")
or not ((ansible_os_family == "RedHat" and ansible_distribution_major_version == "8")
or (ansible_os_family == "FreeBSD"))
- not (item == "brotli")
or not ((ansible_os_family == "Alpine")
or (ansible_os_family == "RedHat" and ansible_distribution_major_version < "8")
or (ansible_os_family == "Debian" and ansible_distribution_major_version == "9")
or (ansible_os_family == "Suse" and ansible_distribution_major_version == "12")
or (ansible_distribution == "Amazon")
or (ansible_distribution == "OracleLinux"))
- not (item == "geoip2") or not (ansible_os_family == "Suse")
- not (item == "opentracing")
or not ((ansible_os_family == "Suse" and ansible_distribution_major_version == "12")
or (ansible_os_family == "RedHat" and ansible_distribution_major_version == "6"))