Implementation of the resolver parameter.

This commit is contained in:
Harry Danes 2013-12-29 15:48:32 +01:00 committed by Harry Danes
parent 1aff2eabcb
commit d0c3168592
2 changed files with 9 additions and 0 deletions

View file

@ -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)

View file

@ -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 -%>