-
Notifications
You must be signed in to change notification settings - Fork 76
/
converge.yml
66 lines (64 loc) · 2.17 KB
/
converge.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
---
- name: Converge
hosts: all
tasks:
- name: Configure NGINX
ansible.builtin.include_role:
name: ansible-role-nginx-config
vars:
nginx_config_debug_output: true
nginx_config_main_template_enable: true
nginx_config_main_template:
template_file: nginx.conf.j2
deployment_location: /etc/nginx/nginx.conf
backup: true
config:
main:
user: nginx
worker_processes: auto
error_log:
file: /var/log/nginx/error.log
level: notice
pid: /var/run/nginx.pid
events:
worker_connections: 1024
http:
include:
- /etc/nginx/mime.types
- /etc/nginx/conf.d/*.conf
nginx_config_http_template_enable: true
nginx_config_http_template:
- template_file: http/default.conf.j2
deployment_location: /etc/nginx/conf.d/default.conf
backup: true
config:
core:
default_type: application/octet-stream
send_file: true
keepalive_timeout: 65s
log:
format:
- name: main
format: |
'$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"'
access:
- path: /var/log/nginx/access.log
format: main
servers:
- core:
listen:
- port: 80
server_name: localhost
error_page:
- code: [500, 502, 503, 504]
uri: /50x.html
locations:
- location: /
core:
root: /usr/share/nginx/html
index: index.html index.html
- location: = /50x.html
core:
root: /usr/share/nginx/html