Skip to content

Commit d401841

Browse files
committed
Change custom_cfg to location_custom_cfg
1 parent d838228 commit d401841

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

manifests/resource/location.pp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
# [*ssl_only*] - Required if the SSL and normal vHost have the same port.
1919
# [*location_alias*] - Path to be used as basis for serving requests for this location
2020
# [*stub_status*] - If true it will point configure module stub_status to provide nginx stats on location
21-
# [*custom_cfg*] - Expects a hash with custom directives, cannot be used with other location types (proxy, fastcgi, root, or stub_status)
21+
# [*location_custom_cfg*] - Expects a hash with custom directives, cannot be used with other location types (proxy, fastcgi, root, or stub_status)
2222
# [*location_cfg_prepend*] - Expects a hash with extra directives to put before anything else inside location (used with all other types except custom_cfg)
2323
# [*location_cfg_append*] - Expects a hash with extra directives to put after everything else inside location (used with all other types except custom_cfg)
2424
# [*try_files*] - An array of file locations to try
@@ -78,7 +78,7 @@
7878
$location_alias = undef,
7979
$option = undef,
8080
$stub_status = undef,
81-
$custom_cfg = undef,
81+
$location_custom_cfg = undef,
8282
$location_cfg_prepend = undef,
8383
$location_cfg_append = undef,
8484
$try_files = undef,
@@ -100,14 +100,12 @@
100100
default => file,
101101
}
102102

103-
notice "custom_cfg ${custom_cfg}"
104-
105103
## Check for various error conditions
106104
if ($vhost == undef) {
107105
fail('Cannot create a location reference without attaching to a virtual host')
108106
}
109-
if (($www_root == undef) and ($proxy == undef) and ($location_alias == undef) and ($stub_status == undef) and ($fastcgi == undef) and ($custom_cfg == undef)) {
110-
fail('Cannot create a location reference without a www_root, proxy, location_alias, fastcgi, stub_status, or custom_cfg defined')
107+
if (($www_root == undef) and ($proxy == undef) and ($location_alias == undef) and ($stub_status == undef) and ($fastcgi == undef) and ($location_custom_cfg == undef)) {
108+
fail('Cannot create a location reference without a www_root, proxy, location_alias, fastcgi, stub_status, or location_custom_cfg defined')
111109
}
112110
if (($www_root != undef) and ($proxy != undef)) {
113111
fail('Cannot define both directory and proxy in a virtual host')

manifests/resource/vhost.pp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@
9191
$www_root = undef,
9292
$rewrite_www_to_non_www = false,
9393
$rewrite_to_https = undef,
94+
$location_custom_cfg = undef,
9495
$location_cfg_prepend = undef,
9596
$location_cfg_append = undef,
9697
$try_files = undef,
@@ -157,6 +158,7 @@
157158
fastcgi_script => $fastcgi_script,
158159
try_files => $try_files,
159160
www_root => $www_root,
161+
location_custom_cfg => $location_custom_cfg,
160162
notify => Class['nginx::service'],
161163
}
162164

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
location <%= location %> {
2-
<% custom_cfg.each do |key,value| -%>
2+
<% location_custom_cfg.each do |key,value| -%>
33
<%= key %> <%= value %>;
44
<% end -%>
55
}

0 commit comments

Comments
 (0)