lab-ansible/roles/apps/tasks/extra_tasks/nginx.yml

22 lines
566 B
YAML
Raw Permalink Normal View History

2023-11-08 21:30:41 +00:00
# vim: ft=yaml.ansible
# code: language=ansible
---
- name: Create subdirectory for NGINX config files
2023-11-08 21:30:41 +00:00
ansible.builtin.file:
path: "{{ apps_data_root }}/nginx/data/conf.d"
2023-11-08 21:30:41 +00:00
owner: root
2024-01-30 18:15:51 +00:00
group: root
2023-11-08 21:30:41 +00:00
mode: u=rwx,g=rx,o=rx
state: directory
- name: Copy NGINX configs
2023-11-08 21:30:41 +00:00
ansible.builtin.template:
src: nginx/conf.d/{{ config }}.conf.j2
dest: "{{ apps_data_root }}/nginx/data/conf.d/{{ config }}.conf"
2023-11-08 21:30:41 +00:00
owner: root
2024-01-30 18:15:51 +00:00
group: root
2023-11-08 21:30:41 +00:00
mode: u=rw,g=r,o=r
loop: "{{ ['http', apps_proxied] | flatten }}"
2023-11-08 21:30:41 +00:00
loop_control:
loop_var: config