From d0c316859230612d4526e0c709dfda88d3179140 Mon Sep 17 00:00:00 2001 From: Harry Danes Date: Sun, 29 Dec 2013 15:48:32 +0100 Subject: [PATCH] Implementation of the resolver parameter. --- manifests/resource/vhost.pp | 6 ++++++ templates/vhost/vhost_ssl_header.erb | 3 +++ 2 files changed, 9 insertions(+) diff --git a/manifests/resource/vhost.pp b/manifests/resource/vhost.pp index 260b3d7..348e810 100644 --- a/manifests/resource/vhost.pp +++ b/manifests/resource/vhost.pp @@ -34,6 +34,8 @@ # nginx::resource::upstream # [*proxy_read_timeout*] - Override the default the proxy read timeout value # of 90 seconds +# [*resolver*] - String: Configures name servers used to resolve +# names of upstream servers into addresses. # [*fastcgi*] - location of fastcgi (host:port) # [*fastcgi_params*] - optional alternative fastcgi_params file to use # [*fastcgi_script*] - optional SCRIPT_FILE parameter @@ -140,6 +142,7 @@ define nginx::resource::vhost ( $proxy_cache_valid = false, $proxy_method = undef, $proxy_set_body = undef, + $resolver = undef, $fastcgi = undef, $fastcgi_params = '/etc/nginx/fastcgi_params', $fastcgi_script = undef, @@ -175,6 +178,9 @@ define nginx::resource::vhost ( if ($add_header != undef) { validate_hash($add_header) } + if ($resolver != undef) { + validate_string($resolver) + } validate_bool($ssl_stapling) if ($ssl_stapling_file != undef) { validate_string($ssl_stapling_file) diff --git a/templates/vhost/vhost_ssl_header.erb b/templates/vhost/vhost_ssl_header.erb index 0ede6d5..79f5411 100644 --- a/templates/vhost/vhost_ssl_header.erb +++ b/templates/vhost/vhost_ssl_header.erb @@ -29,6 +29,9 @@ server { <% if defined? @ssl_trusted_cert -%> ssl_trusted_certificate <%= scope.lookupvar('nginx::params::nx_conf_dir') %>/<%= @name.gsub(' ', '_') %>.trusted.crt; <% end -%> +<% if defined? @resolver -%> + resolver <%= @resolver %>; +<% end -%> <% if defined? @auth_basic -%> auth_basic "<%= @auth_basic %>"; <% end -%>