ansible-role-nginx/tasks/opensource/install-oss.yml

39 lines
1.0 KiB
YAML
Raw Normal View History

2018-01-10 23:40:01 +01:00
---
- name: "(Install: Debian/Ubuntu/CentOS/RedHat/FreeBSD) Install NGINX"
block:
2018-01-10 23:40:01 +01:00
- import_tasks: setup-debian.yml
when: ansible_os_family == "Debian"
2018-01-10 23:40:01 +01:00
- import_tasks: setup-redhat.yml
when: ansible_os_family == "RedHat"
2018-01-10 23:40:01 +01:00
- import_tasks: setup-suse.yml
when: ansible_os_family == "Suse"
- import_tasks: setup-freebsd.yml
when: ansible_os_family == "FreeBSD"
- name: "(Install: Debian/Ubuntu/CentOS/RedHat) Install NGINX"
package:
name: nginx
state: present
when: ansible_os_family != "FreeBSD"
notify: "(Handler: All OSs) Start NGINX"
- name: "(Install: FreeBSD) Install NGINX"
portinstall:
name: nginx
state: present
when: ansible_os_family == "FreeBSD"
notify: "(Handler: All OSs) Start NGINX"
when: install_from == "nginx_repository"
- name: "(Install: Debian/Ubuntu/CentOS/RedHat/FreeBSD) Install NGINX"
package:
2018-01-10 23:40:01 +01:00
name: nginx
state: present
when: nginx_install_from == "os_repository"
notify: "(Handler: All OSs) Start NGINX"