Ansible-Roles/roles/nginx/tasks/nginx-stream.yml
2026-07-10 19:15:53 +03:00

23 lines
643 B
YAML

---
- name: Install and enable the nginx virtualhost files on RH based systems
when: ansible_distribution_file_variety == "RedHat"
tags: [nginx, virtualhost]
block:
- name: Create stream.d directory
ansible.builtin.file:
path: /etc/nginx/stream.d
state: directory
owner: root
group: root
# mode: "0755"
- name: Install the nginx stream files
ansible.builtin.template:
src: nginx-stream.j2
dest: /etc/nginx/stream.d/{{ item.stream }}.conf
owner: root
group: root
# mode: "0444"
loop: "{{ nginx_streams }}"
notify: Reload nginx