---
- name: Create nginx customisation directory
become: true
file:
path: "/home/dokku/{{ app }}/nginx.conf.d/"
state: directory
owner: dokku
group: dokku
- name: Copy over the nginx custom configuration
template:
src: "{{ item }}"
dest: "/home/dokku/{{ app }}/nginx.conf.d/{{ item | basename }}"
with_fileglob:
- "{{ app_config_root }}/nginx.d/*.conf"
- name: Reload nginx to enable custom configurations
service:
name: nginx
state: reloaded