diff --git a/defaults/main.yml b/defaults/main.yml index 85fa48a..d5191c8 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -31,7 +31,7 @@ nginx_keepalive_timeout: "65" nginx_keepalive_requests: "100" nginx_server_tokens: "on" - +nginx_server_resolver: "" nginx_client_max_body_size: "64m" nginx_server_names_hash_bucket_size: "64" diff --git a/templates/nginx.conf.j2 b/templates/nginx.conf.j2 index 74cd591..63d0a13 100644 --- a/templates/nginx.conf.j2 +++ b/templates/nginx.conf.j2 @@ -53,7 +53,9 @@ http { {% if nginx_extra_http_options %} {{ nginx_extra_http_options|indent(4, False) }} {% endif %} - +{%if nginx_server_resolver %} + resolver {{nginx_server_resolver}}; +{% endif %} {% block http_upstream %} {% for upstream in nginx_upstreams %} upstream {{ upstream.name }} {