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

22 lines
566 B
YAML

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