forked from jdauphant/ansible-role-nginx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.yml
68 lines (51 loc) · 1.79 KB
/
main.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
67
68
---
nginx_redhat_pkg:
- nginx
nginx_ubuntu_pkg:
- python-selinux
- nginx
nginx_freebsd_pkg:
- nginx
nginx_suse_pkg:
- nginx
nginx_install_epel_repo: True
nginx_official_repo: False
nginx_official_repo_mainline: False
keep_only_specified: False
nginx_installation_type: "packages"
nginx_binary_name: "nginx"
nginx_service_name: "{{nginx_binary_name}}"
nginx_conf_dir: "{% if ansible_os_family == 'FreeBSD' %}/usr/local/etc/nginx{% else %}/etc/nginx{% endif %}"
nginx_user: "{% if ansible_os_family == 'RedHat' or ansible_os_family == 'Suse' %}nginx{% elif ansible_os_family == 'Debian' %}www-data{% elif ansible_os_family == 'FreeBSD' %}www{% endif %}"
nginx_group: "{{nginx_user}}"
nginx_pid_file: '/var/run/{{nginx_service_name}}.pid'
nginx_worker_processes: "{% if ansible_processor_vcpus is defined %}{{ ansible_processor_vcpus }}{% else %}auto{% endif %}"
nginx_worker_rlimit_nofile: 1024
nginx_log_dir: "/var/log/nginx"
nginx_error_log_level: "error"
nginx_extra_root_params: []
nginx_events_params:
- worker_connections {% if nginx_max_clients is defined %}{{nginx_max_clients}}{% else %}512{% endif %}
nginx_http_params:
- sendfile "on"
- tcp_nopush "on"
- tcp_nodelay "on"
- keepalive_timeout "65"
- access_log "{{nginx_log_dir}}/access.log"
- "error_log {{nginx_log_dir}}/error.log {{nginx_error_log_level}}"
- server_tokens off
- types_hash_max_size 2048
nginx_stream_params: []
nginx_sites:
default:
- listen 80 default_server
- server_name _
- root "{% if ansible_os_family == 'FreeBSD' %}/usr/local/www/nginx-dist{% else %}/usr/share/nginx/html{% endif %}"
- index index.html
nginx_remove_sites: []
nginx_configs: {}
nginx_stream_configs: {}
nginx_remove_configs: []
nginx_auth_basic_files: {}
nginx_remove_auth_basic_files: []
nginx_daemon_mode: "on"