Skip to content

Commit

Permalink
refactor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
aleksmark committed Feb 12, 2019
1 parent f295cf8 commit 92b7979
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions manifests/resource/upstream/member.pp
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
default => "${nginx::config::conf_dir}/conf.d",
}

$real_server = $server ? {
$_server = $server ? {
Pattern[/^unix:\/([^\/\0]+\/*)*$/] => $server,
Stdlib::IP::Address::V6 => "[${server}]:${port}", #lint:ignore:unquoted_string_in_selector
default => "${server}:${port}",
Expand All @@ -85,7 +85,7 @@
target => "${conf_dir}/${upstream}-upstream.conf",
order => 40,
content => epp('nginx/upstream/upstream_member.epp', {
real_server => $real_server,
server => $_server,
backup => $backup,
comment => $comment,
fail_timeout => $fail_timeout,
Expand Down
4 changes: 2 additions & 2 deletions templates/upstream/upstream_member.epp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<%- | $real_server,
<%- | $server,
Boolean $backup = false,
Optional[String[1]] $comment = undef,
Optional[Nginx::Time] $fail_timeout = undef,
Expand All @@ -13,7 +13,7 @@
Optional[Enum['drain','down']] $state = undef,
Optional[Integer[1]] $weight = undef,
| -%>
server <%= $real_server -%>
server <%= $server -%>
<%- if $params_prepend { %> <%= $params_prepend %><% } -%>
<%- if $state { %> <%= $state %><% } -%>
<%- if $weight { %> weight=<%= $weight %><% } -%>
Expand Down

0 comments on commit 92b7979

Please sign in to comment.