38 lines
975 B
YAML
38 lines
975 B
YAML
|
---
|
||
|
- name: "Configuration | Copy main configuration"
|
||
|
ansible.builtin.template:
|
||
|
src: nginx.conf.j2
|
||
|
dest: /etc/nginx/nginx.conf
|
||
|
mode: 0644
|
||
|
notify: reload nginx
|
||
|
|
||
|
- name: "Configuration | Copy configuration snippets"
|
||
|
ansible.builtin.copy:
|
||
|
src: "{{ item }}"
|
||
|
dest: "/etc/nginx/snippets/{{ item }}"
|
||
|
mode: 0644
|
||
|
loop:
|
||
|
- add_headers.conf
|
||
|
- letsentcrypt.conf
|
||
|
notify: reload nginx
|
||
|
|
||
|
- name: "Configuration | Copy configuration templates"
|
||
|
ansible.builtin.template:
|
||
|
src: "{{ item }}.j2"
|
||
|
dest: "/etc/nginx/conf.d/{{ item }}"
|
||
|
mode: 0644
|
||
|
loop:
|
||
|
- bad_clients.conf
|
||
|
- reverse_proxy.conf
|
||
|
- ssl.conf
|
||
|
notify: reload nginx
|
||
|
when: nginx_type is 'gateway' or nginx_type is 'standalone'
|
||
|
|
||
|
- name: "Configuration | Copy request limit configuration"
|
||
|
ansible.builtin.copy:
|
||
|
src: request_limits.conf
|
||
|
dest: /etc/nginx/conf.d/
|
||
|
mode: 0644
|
||
|
notify: reload nginx
|
||
|
when: nginx_type is 'gateway' or nginx_type is 'standalone'
|