Anna Sirota
9e64854798
Adding response times to access logs in a format already supported by Vector. See https://master.vector.dev/docs/reference/vrl/functions/#parse_nginx_log and https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/log-format/ for more information.
32 lines
861 B
YAML
32 lines
861 B
YAML
---
|
|
- hosts: https
|
|
gather_facts: no
|
|
become: yes
|
|
roles: [common]
|
|
vars:
|
|
playbook_type: install
|
|
|
|
tasks:
|
|
- name: Creating various directories
|
|
file: path={{ item }} state=directory owner={{ nginx.user }} group={{ nginx.group }}
|
|
with_items:
|
|
- "{{ dir.errors }}"
|
|
|
|
- import_tasks: tasks/copy_error_pages.yaml
|
|
|
|
- import_tasks: common/tasks/nginx/add_upstreaminfo_log_format.yaml
|
|
|
|
- name: Copying nginx config
|
|
template:
|
|
src: templates/nginx/https.conf
|
|
dest: "{{ nginx_conf_dir }}/sites-available/{{ service_name }}.conf"
|
|
|
|
- import_tasks: common/tasks/nginx/disable_server_tokens.yaml
|
|
- import_tasks: common/tasks/nginx/enable_site.yaml
|
|
vars:
|
|
config_file: "{{ service_name }}.conf"
|
|
|
|
- import_tasks: common/tasks/nginx/get_certificate.yaml
|
|
notify:
|
|
- test nginx
|