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

46 lines
1.6 KiB
YAML
Raw Normal View History

2020-09-15 21:27:06 +02:00
---
2020-09-19 17:32:17 +02:00
- name: (Alpine Linux) Install dependencies
community.general.apk:
2020-09-15 21:27:06 +02:00
name: "{{ nginx_alpine_dependencies }}"
update_cache: true
state: latest # noqa package-latest
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
ansible.builtin.apt:
2020-09-15 21:27:06 +02:00
name: "{{ nginx_debian_dependencies }}"
update_cache: true
state: latest # noqa package-latest
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
ansible.builtin.yum:
2020-09-15 21:27:06 +02:00
name: "{{ nginx_redhat_dependencies }}"
update_cache: true
state: latest # noqa package-latest
2020-09-15 21:27:06 +02:00
when: ansible_facts['os_family'] == "RedHat"
2020-09-19 17:32:17 +02:00
- name: (SLES) Install dependencies
community.general.zypper:
2020-09-15 21:27:06 +02:00
name: "{{ nginx_sles_dependencies }}"
update_cache: true
state: latest # noqa package-latest
2020-09-15 21:27:06 +02:00
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)
community.general.pkgng:
2020-09-15 21:27:06 +02:00
name: "{{ nginx_freebsd_dependencies }}"
state: latest # noqa package-latest
2020-09-15 21:27:06 +02:00
when: nginx_bsd_install_packages | bool
2020-09-19 17:32:17 +02:00
- name: (FreeBSD) Install dependencies using port(s)
community.general.portinstall:
2020-09-15 21:27:06 +02:00
name: "{{ item }}"
use_packages: "{{ nginx_bsd_portinstall_use_packages | default(omit) }}"
state: latest # noqa package-latest
2020-09-15 21:27:06 +02:00
loop: "{{ nginx_freebsd_dependencies }}"
when: not nginx_bsd_install_packages | bool
when: ansible_facts['distribution'] == "FreeBSD"