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

23 lines
1.0 KiB
YAML

---
- name: "{{ nginx_setup | capitalize }} NGINX in Linux systems"
block:
- name: "{{ nginx_setup | capitalize }} NGINX from repository"
ansible.builtin.include_tasks: "{{ role_path }}/tasks/opensource/install-{{ ansible_facts['os_family'] | lower }}.yml"
when: nginx_install_from == "nginx_repository"
- name: "{{ nginx_setup | capitalize }} NGINX from source"
ansible.builtin.include_tasks: "{{ role_path }}/tasks/opensource/install-source.yml"
when: nginx_install_from == "source"
- name: "{{ nginx_setup | capitalize }} NGINX from package"
ansible.builtin.package:
name: "nginx{{ nginx_version | default('') }}"
state: "{{ nginx_state }}"
when: nginx_install_from == "os_repository"
notify: (Handler) Run NGINX
when: ansible_facts['system'] | lower is not search('bsd')
- name: "{{ nginx_setup | capitalize }} NGINX in Unix systems"
ansible.builtin.include_tasks: "{{ role_path }}/tasks/opensource/install-bsd.yml"
when: ansible_facts['system'] | lower is search('bsd')