ansible-role-nginx/tasks/prerequisites/install-dependencies.yml

38 lines
1.2 KiB
YAML
Raw Permalink Normal View History

2020-09-15 21:27:06 +02:00
---
2020-09-19 17:32:17 +02:00
- name: (Alpine Linux) Install dependencies
2020-09-15 21:27:06 +02:00
apk:
name: "{{ nginx_alpine_dependencies }}"
update_cache: true
2020-09-15 21:27:06 +02:00
when: ansible_facts['os_family'] == "Alpine"
2020-09-19 17:32:17 +02:00
- name: (Debian/Ubuntu) Install dependencies
2020-09-15 21:27:06 +02:00
apt:
name: "{{ nginx_debian_dependencies }}"
update_cache: true
2020-09-15 21:27:06 +02:00
when: ansible_facts['os_family'] == "Debian"
2020-09-19 17:32:17 +02:00
- name: (Amazon Linux/CentOS/Oracle Linux/RHEL) Install dependencies
2020-09-15 21:27:06 +02:00
yum:
name: "{{ nginx_redhat_dependencies }}"
when: ansible_facts['os_family'] == "RedHat"
2020-09-19 17:32:17 +02:00
- name: (SLES) Install dependencies
2020-09-15 21:27:06 +02:00
zypper:
name: "{{ nginx_sles_dependencies }}"
when: ansible_facts['os_family'] == "Suse"
2020-09-19 17:32:17 +02:00
- name: (FreeBSD) Install dependencies
2020-09-15 21:27:06 +02:00
block:
2020-09-19 17:32:17 +02:00
- name: (FreeBSD) Install dependencies using package(s)
2020-09-15 21:27:06 +02:00
pkgng:
name: "{{ nginx_freebsd_dependencies }}"
when: nginx_bsd_install_packages | bool
2020-09-19 17:32:17 +02:00
- name: (FreeBSD) Install dependencies using port(s)
2020-09-15 21:27:06 +02:00
portinstall:
name: "{{ item }}"
use_packages: "{{ nginx_bsd_portinstall_use_packages | default(omit) }}"
loop: "{{ nginx_freebsd_dependencies }}"
when: not nginx_bsd_install_packages | bool
when: ansible_facts['distribution'] == "FreeBSD"