ansible-role-nginx/tasks/opensource/install-oss.yml
Alessandro Fael Garcia 41aeda300d
Add option to specify the version of NGINX to install (#177)
And remove outdated Debian Jessie Molecule tests
2019-11-03 15:07:38 +01:00

39 lines
1.1 KiB
YAML

---
- name: "(Install: Debian/Ubuntu/CentOS/RedHat/FreeBSD) Install NGINX"
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"
- import_tasks: setup-freebsd.yml
when: ansible_os_family == "FreeBSD"
- name: "(Install: Debian/Ubuntu/CentOS/RedHat) Install NGINX"
package:
name: "nginx{{ nginx_version | default('') }}"
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: nginx_install_from == "nginx_repository"
- name: "(Install: Debian/Ubuntu/CentOS/RedHat/FreeBSD) Install NGINX"
package:
name: "nginx{{ nginx_version | default('') }}"
state: present
when: nginx_install_from == "os_repository"
notify: "(Handler: All OSs) Start NGINX"