Skip to content

Commit

Permalink
Merge pull request #290 from pderaaij/master
Browse files Browse the repository at this point in the history
Add configuring multiple resolvers via an array instead of a string
  • Loading branch information
James Fryman committed Apr 6, 2014
2 parents e20a343 + 1fbfe53 commit b0efd27
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
8 changes: 3 additions & 5 deletions manifests/resource/vhost.pp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
# 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
# [*resolver*] - Array: 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
Expand Down Expand Up @@ -151,7 +151,7 @@
$proxy_cache_valid = false,
$proxy_method = undef,
$proxy_set_body = undef,
$resolver = undef,
$resolver = [],
$fastcgi = undef,
$fastcgi_params = '/etc/nginx/fastcgi_params',
$fastcgi_script = undef,
Expand Down Expand Up @@ -248,9 +248,7 @@
if ($proxy_set_body != undef) {
validate_string($proxy_set_body)
}
if ($resolver != undef) {
validate_string($resolver)
}
validate_array($resolver)
if ($fastcgi != undef) {
validate_string($fastcgi)
}
Expand Down
4 changes: 2 additions & 2 deletions templates/vhost/vhost_ssl_header.erb
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ 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 %>;
<% if @resolver.count > 0 -%>
resolver <% Array(@resolver).each do |r| %> <%= r %><% end %>;
<% end -%>
<% if defined? @auth_basic -%>
auth_basic "<%= @auth_basic %>";
Expand Down

0 comments on commit b0efd27

Please sign in to comment.