23 lines
777 B
YAML
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
|