2018-01-10 23:40:01 +01:00
|
|
|
---
|
2021-12-07 02:47:13 +01:00
|
|
|
- name: "{{ nginx_setup | capitalize }} NGINX in Linux systems"
|
2020-09-15 21:27:06 +02:00
|
|
|
block:
|
2021-12-07 02:47:13 +01:00
|
|
|
- name: "{{ nginx_setup | capitalize }} NGINX from repository"
|
2022-03-22 18:27:11 +01:00
|
|
|
ansible.builtin.include_tasks: "{{ role_path }}/tasks/opensource/install-{{ ansible_facts['os_family'] | lower }}.yml"
|
2020-09-15 21:27:06 +02:00
|
|
|
when: nginx_install_from == "nginx_repository"
|
|
|
|
|
2021-12-07 02:47:13 +01:00
|
|
|
- name: "{{ nginx_setup | capitalize }} NGINX from source"
|
2022-03-22 18:27:11 +01:00
|
|
|
ansible.builtin.include_tasks: "{{ role_path }}/tasks/opensource/install-source.yml"
|
2020-09-15 21:27:06 +02:00
|
|
|
when: nginx_install_from == "source"
|
|
|
|
|
2021-12-07 02:47:13 +01:00
|
|
|
- name: "{{ nginx_setup | capitalize }} NGINX from package"
|
2022-03-22 18:27:11 +01:00
|
|
|
ansible.builtin.package:
|
2020-09-15 21:27:06 +02:00
|
|
|
name: "nginx{{ nginx_version | default('') }}"
|
|
|
|
state: "{{ nginx_state }}"
|
|
|
|
when: nginx_install_from == "os_repository"
|
2020-09-19 17:32:17 +02:00
|
|
|
notify: (Handler) Run NGINX
|
2020-09-15 21:27:06 +02:00
|
|
|
when: ansible_facts['system'] | lower is not search('bsd')
|
|
|
|
|
2021-12-07 02:47:13 +01:00
|
|
|
- name: "{{ nginx_setup | capitalize }} NGINX in Unix systems"
|
2022-03-22 18:27:11 +01:00
|
|
|
ansible.builtin.include_tasks: "{{ role_path }}/tasks/opensource/install-bsd.yml"
|
2020-09-15 21:27:06 +02:00
|
|
|
when: ansible_facts['system'] | lower is search('bsd')
|