Merge pull request #2 from nexcess/rfxn-events-extras

support events{} extra options
pull/129/head
Ryan MacDonald 6 years ago committed by GitHub
commit 96e582ecf9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      defaults/main.yml
  2. 5
      templates/nginx.conf.j2

@ -18,7 +18,12 @@ nginx_vhost_template: "vhost.j2"
nginx_worker_processes: "{{ ansible_processor_vcpus | default(ansible_processor_count) }}"
nginx_worker_connections: "1024"
nginx_multi_accept: "off"
#nginx_use_method: "epoll"
nginx_extra_events_options: ""
# Example extra events{} options
# nginx_extra_events_options: |
# accept_mutex on;
# use epoll;
nginx_error_log: "/var/log/nginx/error.log warn"
nginx_access_log: "/var/log/nginx/access.log main buffer=16k flush=2m"

@ -15,9 +15,10 @@ worker_processes {{ nginx_worker_processes }};
events {
worker_connections {{ nginx_worker_connections }};
multi_accept {{ nginx_multi_accept | default('off') }};
{% if nginx_use_method is defined %}
use {{ nginx_use_method }};
{% if nginx_extra_events_options %}
{{ nginx_extra_events_options|indent(4, False) }}
{% endif %}
}
{% endblock %}