Skip to content

Commit

Permalink
Merge pull request voxpupuli#171 from thomasbiddle/upstream_fail_timeout
Browse files Browse the repository at this point in the history
Adding upstream fail_timeout.
  • Loading branch information
James Fryman committed Jan 28, 2014
2 parents 933ca35 + 44853e4 commit ddeb36d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion manifests/resource/upstream.pp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
# Parameters:
# [*members*] - Array of member URIs for NGINX to connect to. Must follow valid NGINX syntax.
# [*ensure*] - Enables or disables the specified location (present|absent)
# [*upstream_cfg_prepend*] - It expects a hash with custom directives to put before anything else inside upstream
# [*upstream_cfg_prepend*] - It expects a hash with custom directives to put before anything else inside upstream
# [*upstream_fail_timeout*] - Set the fail_timeout for the upstream. Default is 10 seconds - As that is what Nginx does normally.
#
# Actions:
#
Expand Down Expand Up @@ -40,6 +41,7 @@
$members,
$ensure = 'present',
$upstream_cfg_prepend = undef,
$upstream_fail_timeout = '10s',
) {

validate_array($members)
Expand Down
2 changes: 1 addition & 1 deletion templates/conf.d/upstream.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ upstream <%= @name %> {
<%= key %> <%= value %>;
<% end -%><% end -%>
<% @members.each do |i| %>
server <%= i %>;<% end %>
server <%= i %> fail_timeout=<%= @upstream_fail_timeout %>;<% end %>
}

0 comments on commit ddeb36d

Please sign in to comment.