102 lines
2.5 KiB
YAML
102 lines
2.5 KiB
YAML
|
---
|
||
|
- import_tasks: setup-debian.yml
|
||
|
when: ansible_os_family == "Debian"
|
||
|
|
||
|
- import_tasks: setup-redhat.yml
|
||
|
when: ansible_os_family == "RedHat"
|
||
|
|
||
|
- name: "(Install: All OSs) Install NGINX Unit"
|
||
|
package:
|
||
|
name: unit
|
||
|
state: present
|
||
|
notify: "(Handler: All OSs) Start NGINX Unit"
|
||
|
|
||
|
- name: "(Install: All OSs) Install NGINX Unit"
|
||
|
package:
|
||
|
name: "{{ item }}"
|
||
|
state: present
|
||
|
with_items:
|
||
|
- unit-php
|
||
|
- unit-python
|
||
|
- unit-go
|
||
|
- unit-perl
|
||
|
when: ansible_distribution == "CentOS"
|
||
|
notify: "(Handler: All OSs) Start NGINX Unit"
|
||
|
|
||
|
- name: "(Install: All OSs) Install NGINX Unit"
|
||
|
package:
|
||
|
name: "{{ item }}"
|
||
|
state: present
|
||
|
with_items:
|
||
|
- unit-php
|
||
|
- unit-python
|
||
|
- unit-perl
|
||
|
when: ansible_distribution == "RedHat" and ansible_distribution_major_version|int == 6
|
||
|
notify: "(Handler: All OSs) Start NGINX Unit"
|
||
|
|
||
|
- name: "(Install: All OSs) Install NGINX Unit"
|
||
|
package:
|
||
|
name: "{{ item }}"
|
||
|
state: present
|
||
|
with_items:
|
||
|
- unit-php
|
||
|
- unit-python
|
||
|
- unit-go
|
||
|
- unit-perl
|
||
|
when: ansible_distribution == "RedHat" and ansible_distribution_major_version|int == 6
|
||
|
notify: "(Handler: All OSs) Start NGINX Unit"
|
||
|
|
||
|
- name: "(Install: All OSs) Install NGINX Unit"
|
||
|
package:
|
||
|
name: "{{ item }}"
|
||
|
state: present
|
||
|
with_items:
|
||
|
- unit-php
|
||
|
- unit-python27
|
||
|
- unit-python34
|
||
|
- unit-python35
|
||
|
- unit-python36
|
||
|
- unit-go
|
||
|
- unit-perl
|
||
|
when: ansible_distribution == "Amazon"
|
||
|
notify: "(Handler: All OSs) Start NGINX Unit"
|
||
|
|
||
|
- name: "(Install: All OSs) Install NGINX Unit"
|
||
|
package:
|
||
|
name: "{{ item }}"
|
||
|
state: present
|
||
|
with_items:
|
||
|
- unit-php
|
||
|
- unit-python2.7
|
||
|
- unit-python3.5
|
||
|
- unit-go
|
||
|
- unit-perl
|
||
|
when: ansible_distribution == "Ubuntu" and ansible_distribution_major_version|int == 16
|
||
|
notify: "(Handler: All OSs) Start NGINX Unit"
|
||
|
|
||
|
- name: "(Install: All OSs) Install NGINX Unit"
|
||
|
package:
|
||
|
name: "{{ item }}"
|
||
|
state: present
|
||
|
with_items:
|
||
|
- unit-php
|
||
|
- unit-python2.7
|
||
|
- unit-python3.4
|
||
|
- unit-perl
|
||
|
when: ansible_distribution == "Debian" and ansible_distribution_major_version|int == 8
|
||
|
notify: "(Handler: All OSs) Start NGINX Unit"
|
||
|
|
||
|
- name: "(Install: All OSs) Install NGINX Unit"
|
||
|
package:
|
||
|
name: "{{ item }}"
|
||
|
state: present
|
||
|
with_items:
|
||
|
- unit-php
|
||
|
- unit-python2.7
|
||
|
- unit-python3.5
|
||
|
- unit-go1.7
|
||
|
- unit-go1.8
|
||
|
- unit-perl
|
||
|
when: ansible_distribution == "RedHat" and ansible_distribution_major_version|int == 9
|
||
|
notify: "(Handler: All OSs) Start NGINX Unit"
|