Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -3345,6 +3345,7 @@ The following parameters are available in the `nginx::resource::server` defined
* [`fastcgi_params`](#-nginx--resource--server--fastcgi_params)
* [`fastcgi_index`](#-nginx--resource--server--fastcgi_index)
* [`fastcgi_script`](#-nginx--resource--server--fastcgi_script)
* [`uwsgi_param`](#-nginx--resource--server--uwsgi_param)
* [`uwsgi_read_timeout`](#-nginx--resource--server--uwsgi_read_timeout)
* [`ssl`](#-nginx--resource--server--ssl)
* [`ssl_cert`](#-nginx--resource--server--ssl_cert)
Expand Down Expand Up @@ -3740,6 +3741,14 @@ optional SCRIPT_FILE parameter

Default value: `undef`

##### <a name="-nginx--resource--server--uwsgi_param"></a>`uwsgi_param`

Data type: `Optional[Hash]`

Set additional custom uwsgi parameters (uwsgi_param in nginx) in the default vhost.

Default value: `undef`

##### <a name="-nginx--resource--server--uwsgi_read_timeout"></a>`uwsgi_read_timeout`

Data type: `Optional[String]`
Expand Down
4 changes: 4 additions & 0 deletions manifests/resource/server.pp
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@
# optional FastCGI index page
# @param fastcgi_script
# optional SCRIPT_FILE parameter
# @param uwsgi_param
# Set additional custom uwsgi parameters (uwsgi_param in nginx) in the default vhost.
# @param uwsgi_read_timeout
# optional value for uwsgi_read_timeout
# @param ssl
Expand Down Expand Up @@ -360,6 +362,7 @@
String $fastcgi_params = "${nginx::conf_dir}/fastcgi.conf",
Optional[String] $fastcgi_script = undef,
Optional[String] $uwsgi = undef,
Optional[Hash] $uwsgi_param = undef,
String $uwsgi_params = "${nginx::config::conf_dir}/uwsgi_params",
Optional[String] $uwsgi_read_timeout = undef,
Array $index_files = [
Expand Down Expand Up @@ -545,6 +548,7 @@
fastcgi_params => $fastcgi_params,
fastcgi_script => $fastcgi_script,
uwsgi => $uwsgi,
uwsgi_param => $uwsgi_param,
uwsgi_params => $uwsgi_params,
uwsgi_read_timeout => $uwsgi_read_timeout,
try_files => $try_files,
Expand Down
12 changes: 12 additions & 0 deletions spec/defines/resource_server_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1463,6 +1463,18 @@
it { is_expected.not_to contain_file('/etc/nginx/bogusparams') }
end

context 'when uwsgi_param has custom params' do
let :params do
default_params.merge(
uwsgi_param: {
'X-Custom-Param': 'Someting',
}
)
end

it { is_expected.to contain_nginx__resource__location("#{title}-default").with_uwsgi_param('X-Custom-Param' => 'Someting') }
end

context 'when listen_port == ssl_port but ssl = false' do
let :params do
default_params.merge(listen_port: 80,
Expand All @@ -1472,7 +1484,7 @@

# TODO: implement test after this can be tested
# msg = %r{nginx: ssl must be true if listen_port is the same as ssl_port}
it 'Testing for warnings not yet implemented in classes'

Check warning on line 1487 in spec/defines/resource_server_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 8 (Ruby 3.2)

nginx::resource::server on oraclelinux-9-x86_64 with Facter 5.1.0 and Puppet 8.23.1 os-independent items attribute resources when listen_port == ssl_port but ssl = false Testing for warnings not yet implemented in classes Skipped: Not yet implemented

Check warning on line 1487 in spec/defines/resource_server_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 8 (Ruby 3.2)

nginx::resource::server on oraclelinux-8-x86_64 with Facter 5.1.0 and Puppet 8.23.1 os-independent items attribute resources when listen_port == ssl_port but ssl = false Testing for warnings not yet implemented in classes Skipped: Not yet implemented

Check warning on line 1487 in spec/defines/resource_server_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 8 (Ruby 3.2)

nginx::resource::server on almalinux-9-x86_64 with Facter 5.1.0 and Puppet 8.23.1 os-independent items attribute resources when listen_port == ssl_port but ssl = false Testing for warnings not yet implemented in classes Skipped: Not yet implemented

Check warning on line 1487 in spec/defines/resource_server_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 8 (Ruby 3.2)

nginx::resource::server on almalinux-8-x86_64 with Facter 5.1.0 and Puppet 8.23.1 os-independent items attribute resources when listen_port == ssl_port but ssl = false Testing for warnings not yet implemented in classes Skipped: Not yet implemented

Check warning on line 1487 in spec/defines/resource_server_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 8 (Ruby 3.2)

nginx::resource::server on rocky-9-x86_64 with Facter 5.1.0 and Puppet 8.23.1 os-independent items attribute resources when listen_port == ssl_port but ssl = false Testing for warnings not yet implemented in classes Skipped: Not yet implemented

Check warning on line 1487 in spec/defines/resource_server_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 8 (Ruby 3.2)

nginx::resource::server on rocky-8-x86_64 with Facter 5.1.0 and Puppet 8.23.1 os-independent items attribute resources when listen_port == ssl_port but ssl = false Testing for warnings not yet implemented in classes Skipped: Not yet implemented

Check warning on line 1487 in spec/defines/resource_server_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 8 (Ruby 3.2)

nginx::resource::server on redhat-9-x86_64 with Facter 5.1.0 and Puppet 8.23.1 os-independent items attribute resources when listen_port == ssl_port but ssl = false Testing for warnings not yet implemented in classes Skipped: Not yet implemented

Check warning on line 1487 in spec/defines/resource_server_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 8 (Ruby 3.2)

nginx::resource::server on redhat-8-x86_64 with Facter 5.1.0 and Puppet 8.23.1 os-independent items attribute resources when listen_port == ssl_port but ssl = false Testing for warnings not yet implemented in classes Skipped: Not yet implemented

Check warning on line 1487 in spec/defines/resource_server_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 8 (Ruby 3.2)

nginx::resource::server on debian-12-x86_64 with Facter 5.1.0 and Puppet 8.23.1 os-independent items attribute resources when listen_port == ssl_port but ssl = false Testing for warnings not yet implemented in classes Skipped: Not yet implemented

Check warning on line 1487 in spec/defines/resource_server_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 8 (Ruby 3.2)

nginx::resource::server on debian-11-x86_64 with Facter 5.1.0 and Puppet 8.23.1 os-independent items attribute resources when listen_port == ssl_port but ssl = false Testing for warnings not yet implemented in classes Skipped: Not yet implemented
end

context 'when listen_port != ssl_port' do
Expand Down
Loading