Skip to content

Commit

Permalink
Merge pull request #1584 from voxpupuli/remove-legacy-top-scope-syntax
Browse files Browse the repository at this point in the history
Remove legacy top-scope syntax
  • Loading branch information
TheMeier committed Jun 5, 2024
2 parents befd673 + edadf13 commit 417c599
Show file tree
Hide file tree
Showing 12 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -1098,7 +1098,7 @@ https://github.com/voxpupuli/puppet-nginx/pull/1385 changes the default behaviou
- 'undef' from left operand of 'in' expression is not a string at /etc/puppet/modules/nginx/manifests/params.pp:23 [\#601](https://github.com/voxpupuli/puppet-nginx/issues/601)
- \[WIP\] Improve SSL support [\#599](https://github.com/voxpupuli/puppet-nginx/issues/599)
- ssl vhost gives error [\#585](https://github.com/voxpupuli/puppet-nginx/issues/585)
- class ::nginx::config has not been evaluated [\#580](https://github.com/voxpupuli/puppet-nginx/issues/580)
- class nginx::config has not been evaluated [\#580](https://github.com/voxpupuli/puppet-nginx/issues/580)
- vagrant vhost files [\#577](https://github.com/voxpupuli/puppet-nginx/issues/577)
- How to set document root in server block using hiera? [\#576](https://github.com/voxpupuli/puppet-nginx/issues/576)
- Configure passenger through hiera. [\#568](https://github.com/voxpupuli/puppet-nginx/issues/568)
Expand Down
2 changes: 1 addition & 1 deletion HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,7 @@
- 'undef' from left operand of 'in' expression is not a string at /etc/puppet/modules/nginx/manifests/params.pp:23 [\#601](https://github.com/voxpupuli/puppet-nginx/issues/601)
- \[WIP\] Improve SSL support [\#599](https://github.com/voxpupuli/puppet-nginx/issues/599)
- ssl vhost gives error [\#585](https://github.com/voxpupuli/puppet-nginx/issues/585)
- class ::nginx::config has not been evaluated [\#580](https://github.com/voxpupuli/puppet-nginx/issues/580)
- class nginx::config has not been evaluated [\#580](https://github.com/voxpupuli/puppet-nginx/issues/580)
- vagrant vhost files [\#577](https://github.com/voxpupuli/puppet-nginx/issues/577)
- How to set document root in server block using hiera? [\#576](https://github.com/voxpupuli/puppet-nginx/issues/576)
- Configure passenger through hiera. [\#568](https://github.com/voxpupuli/puppet-nginx/issues/568)
Expand Down
6 changes: 3 additions & 3 deletions manifests/resource/server.pp
Original file line number Diff line number Diff line change
Expand Up @@ -639,9 +639,9 @@
}
}

create_resources('::nginx::resource::map', $string_mappings)
create_resources('::nginx::resource::geo', $geo_mappings)
create_resources('::nginx::resource::location', $locations, {
create_resources('nginx::resource::map', $string_mappings)
create_resources('nginx::resource::geo', $geo_mappings)
create_resources('nginx::resource::location', $locations, {
ensure => $ensure,
server => $name_sanitized,
ssl => $ssl,
Expand Down
2 changes: 1 addition & 1 deletion spec/defines/resource_geo_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

let :pre_condition do
[
'include ::nginx'
'include nginx'
]
end

Expand Down
2 changes: 1 addition & 1 deletion spec/defines/resource_location_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
end
let :pre_condition do
[
'include ::nginx'
'include nginx'
]
end

Expand Down
4 changes: 2 additions & 2 deletions spec/defines/resource_mailhost_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
ipv6_enable: true
}
end
let(:pre_condition) { ['include ::nginx'] }
let(:pre_condition) { ['include nginx'] }

describe 'os-independent items' do
describe 'basic assumptions' do
Expand Down Expand Up @@ -689,7 +689,7 @@
facts.merge(nginx_version: '1.16.0')
end

let(:pre_condition) { ['include ::nginx'] }
let(:pre_condition) { ['include nginx'] }

it 'has `ssl` at end of listen directive' do
content = catalogue.resource('concat::fragment', "#{title}-ssl").send(:parameters)[:content]
Expand Down
2 changes: 1 addition & 1 deletion spec/defines/resource_map_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

let :pre_condition do
[
'include ::nginx'
'include nginx'
]
end

Expand Down
2 changes: 1 addition & 1 deletion spec/defines/resource_server_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

let :pre_condition do
[
'include ::nginx'
'include nginx'
]
end

Expand Down
2 changes: 1 addition & 1 deletion spec/defines/resource_stream_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

let :pre_condition do
[
'include ::nginx'
'include nginx'
]
end

Expand Down
2 changes: 1 addition & 1 deletion spec/defines/resource_upstream_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

let :pre_condition do
[
'include ::nginx'
'include nginx'
]
end

Expand Down
8 changes: 4 additions & 4 deletions templates/server/server_header.erb
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ server {
<% elsif @access_log == 'off' -%>
access_log off;
<% elsif not @access_log -%>
access_log <%= scope['::nginx::config::log_dir'] %>/<%= @name_sanitized %>.access.log<% if @format_log %> <%= @format_log%><% end %>;
access_log <%= scope['nginx::config::log_dir'] %>/<%= @name_sanitized %>.access.log<% if @format_log %> <%= @format_log%><% end %>;
<% else -%>
access_log <%= @access_log %><% if @format_log %> <%= @format_log%><% end %>;
<% end -%>
Expand All @@ -52,7 +52,7 @@ server {
<%- end -%>
<% elsif @error_log == 'absent' -%>
<% elsif not @error_log -%>
error_log <%= scope['::nginx::config::log_dir'] %>/<%= @name_sanitized %>.error.log;
error_log <%= scope['nginx::config::log_dir'] %>/<%= @name_sanitized %>.error.log;
<% else -%>
error_log <%= @error_log %>;
<% end -%>
Expand Down Expand Up @@ -194,7 +194,7 @@ server {
<% elsif @access_log == 'off' -%>
access_log off;
<% elsif not @access_log -%>
access_log <%= scope['::nginx::config::log_dir'] %>/<%= @name_sanitized %>.access.log<% if @format_log %> <%= @format_log%><% end %>;
access_log <%= scope['nginx::config::log_dir'] %>/<%= @name_sanitized %>.access.log<% if @format_log %> <%= @format_log%><% end %>;
<% else -%>
access_log <%= @access_log %><% if @format_log %> <%= @format_log%><% end %>;
<% end -%>
Expand All @@ -204,7 +204,7 @@ server {
<%- end -%>
<% elsif @error_log == 'absent' -%>
<% elsif not @error_log -%>
error_log <%= scope['::nginx::config::log_dir'] %>/<%= @name_sanitized %>.error.log;
error_log <%= scope['nginx::config::log_dir'] %>/<%= @name_sanitized %>.error.log;
<% else -%>
error_log <%= @error_log %>;
<% end -%>
Expand Down
8 changes: 4 additions & 4 deletions templates/server/server_ssl_header.erb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ server {
<% elsif @access_log == 'off' -%>
access_log off;
<% elsif not @access_log -%>
access_log <%= scope['::nginx::config::log_dir'] %>/ssl-<%= @name_sanitized %>.access.log<% if @format_log %> <%= @format_log%><% end %>;
access_log <%= scope['nginx::config::log_dir'] %>/ssl-<%= @name_sanitized %>.access.log<% if @format_log %> <%= @format_log%><% end %>;
<% else -%>
access_log <%= @access_log %><% if @format_log %> <%= @format_log%><% end %>;
<% end -%>
Expand All @@ -35,7 +35,7 @@ server {
<%- end -%>
<% elsif @error_log == 'absent' -%>
<% elsif not @error_log -%>
error_log <%= scope['::nginx::config::log_dir'] %>/ssl-<%= @name_sanitized %>.error.log;
error_log <%= scope['nginx::config::log_dir'] %>/ssl-<%= @name_sanitized %>.error.log;
<% else -%>
error_log <%= @error_log %>;
<% end -%>
Expand Down Expand Up @@ -123,7 +123,7 @@ server {
<% elsif @access_log == 'off' -%>
access_log off;
<% elsif not @access_log -%>
access_log <%= scope['::nginx::config::log_dir'] %>/ssl-<%= @name_sanitized %>.access.log<% if @format_log %> <%= @format_log%><% end %>;
access_log <%= scope['nginx::config::log_dir'] %>/ssl-<%= @name_sanitized %>.access.log<% if @format_log %> <%= @format_log%><% end %>;
<% else -%>
access_log <%= @access_log %><% if @format_log %> <%= @format_log%><% end %>;
<% end -%>
Expand All @@ -133,7 +133,7 @@ server {
<%- end -%>
<% elsif @error_log == 'absent' -%>
<% elsif not @error_log -%>
error_log <%= scope['::nginx::config::log_dir'] %>/ssl-<%= @name_sanitized %>.error.log;
error_log <%= scope['nginx::config::log_dir'] %>/ssl-<%= @name_sanitized %>.error.log;
<% else -%>
error_log <%= @error_log %>;
<% end -%>
Expand Down

0 comments on commit 417c599

Please sign in to comment.