ansible-role-nginx/tasks/unit/install-unit.yml

102 lines
2.6 KiB
YAML
Raw Normal View History

2018-04-07 01:32:48 +02:00
---
- 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: CentOS) Install NGINX Unit Packages"
2018-04-07 01:32:48 +02:00
package:
name: "{{ item }}"
state: present
with_items:
- unit-php
- unit-python
- unit-go
- unit-perl
when: ansible_distribution == "CentOS" and unit_packages
2018-04-07 01:32:48 +02:00
notify: "(Handler: All OSs) Start NGINX Unit"
- name: "(Install: RedHat) Install NGINX Unit Packages"
2018-04-07 01:32:48 +02:00
package:
name: "{{ item }}"
state: present
with_items:
- unit-php
- unit-python
- unit-perl
when: ansible_distribution == "RedHat" and ansible_distribution_major_version|int == 6 and unit_packages
2018-04-07 01:32:48 +02:00
notify: "(Handler: All OSs) Start NGINX Unit"
- name: "(Install: RedHat) Install NGINX Unit Packages"
2018-04-07 01:32:48 +02:00
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 == 7 and unit_packages
2018-04-07 01:32:48 +02:00
notify: "(Handler: All OSs) Start NGINX Unit"
- name: "(Install: Amazon Linux) Install NGINX Unit Packages"
2018-04-07 01:32:48 +02:00
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: Debian 8) Install NGINX Unit"
2018-04-07 01:32:48 +02:00
package:
name: "{{ item }}"
state: present
with_items:
- unit-php
- unit-python2.7
- unit-python3.4
2018-04-07 01:32:48 +02:00
- unit-perl
when: ansible_distribution == "Debian" and ansible_distribution_major_version|int == 8 and unit_packages
2018-04-07 01:32:48 +02:00
notify: "(Handler: All OSs) Start NGINX Unit"
- name: "(Install: Debian 9) Install NGINX Unit"
2018-04-07 01:32:48 +02:00
package:
name: "{{ item }}"
state: present
with_items:
- unit-php
- unit-python2.7
- unit-python3.5
- unit-go1.7
- unit-go1.8
2018-04-07 01:32:48 +02:00
- unit-perl
when: ansible_distribution == "Debian" and ansible_distribution_major_version|int == 9 and unit_packages
2018-04-07 01:32:48 +02:00
notify: "(Handler: All OSs) Start NGINX Unit"
- name: "(Install: Ubuntu) Install NGINX Unit"
2018-04-07 01:32:48 +02:00
package:
name: "{{ item }}"
state: present
with_items:
- unit-php
- unit-python2.7
- unit-python3.5
- unit-go
2018-04-07 01:32:48 +02:00
- unit-perl
when: ansible_distribution == "Ubuntu" and ansible_distribution_major_version|int == 16 and unit_packages
2018-04-07 01:32:48 +02:00
notify: "(Handler: All OSs) Start NGINX Unit"