dalab-django/roles/nginxinc.nginx_unit/tasks/unit/install-unit.yml
2023-03-09 18:02:25 +03:00

23 lines
777 B
YAML

---
- name: Configure NGINX Unit repository
include_tasks: "{{ role_path }}/tasks/unit/setup-{{ ansible_facts['os_family'] | lower }}.yml"
when: ansible_facts['os_family'] in ['Debian', 'FreeBSD', 'RedHat']
- name: (Amazon Linux/CentOS/Debian/RedHat/Ubuntu) Install NGINX Unit
package:
name: unit
state: present
when: ansible_facts['os_family'] != "FreeBSD"
notify: (Handler - Amazon Linux/CentOS/Debian/RedHat/Ubuntu) Start NGINX Unit
- name: (FreeBSD) Install NGINX Unit
portinstall:
name: unit
state: present
when: ansible_facts['os_family'] == "FreeBSD"
notify: (Handler - FreeBSD) Start NGINX Unit
- name: Install NGINX Unit modules
include_tasks: "{{ role_path }}/tasks/unit/install-modules.yml"
when: nginx_unit_modules is defined