27d94628bd
* Added variable nginx_linux_families: ['Debian', 'RedHat', 'Suse'] * Added variable nginx_bsd_systems: ['FreeBSD', 'NetBSD', 'OpenBSD', 'DragonFlyBSD', 'HardenedBSD'] * Handler started only in "not ansible_check_mode" to avoid --check failure when service hes not been installed yet * Installation of Linux moved to install-oss-linux.yml * Installation of BSD moved to install-oss-bsd.yml * File setup-freebsd.yml deleted
22 lines
571 B
YAML
22 lines
571 B
YAML
---
|
|
- name: "(Install: Linux) Configure NGINX repo"
|
|
block:
|
|
|
|
- import_tasks: setup-debian.yml
|
|
when: ansible_os_family == "Debian"
|
|
|
|
- import_tasks: setup-redhat.yml
|
|
when: ansible_os_family == "RedHat"
|
|
|
|
- import_tasks: setup-suse.yml
|
|
when: ansible_os_family == "Suse"
|
|
|
|
when: nginx_install_from == "nginx_repository"
|
|
|
|
- name: "(Install: Linux) Install NGINX package"
|
|
package:
|
|
name: "nginx{{ nginx_version | default('') }}"
|
|
state: present
|
|
when: ansible_os_family in nginx_linux_families
|
|
notify: "(Handler: All OSs) Start NGINX"
|