Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Propery handle ${client_body,proxy}_temp_path #1251

Merged
merged 1 commit into from
Oct 1, 2018
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
17 changes: 10 additions & 7 deletions manifests/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -182,15 +182,18 @@
group => $log_group,
}

file {$client_body_temp_path:
ensure => directory,
owner => $daemon_user,
if $client_body_temp_path {
file {$client_body_temp_path:
ensure => directory,
owner => $daemon_user,
}
}


file {$proxy_temp_path:
ensure => directory,
owner => $daemon_user,
if $proxy_temp_path {
file {$proxy_temp_path:
ensure => directory,
owner => $daemon_user,
}
}

unless $confd_only {
Expand Down
4 changes: 2 additions & 2 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
# }
class nginx (
### START Nginx Configuration ###
$client_body_temp_path = $nginx::params::client_body_temp_path,
Variant[Stdlib::Absolutepath, Boolean] $client_body_temp_path = $nginx::params::client_body_temp_path,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't sure about a boolean false here or an empty string. Thoughts?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think Boolean is better than empty string and it's probably not worth making it a breaking change by defaulting to undef and making it Optional.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does mean that true is allowed but not really handled - OTOH, it wasn't either in the past

Boolean $confd_only = false,
Boolean $confd_purge = false,
$conf_dir = $nginx::params::conf_dir,
Expand All @@ -45,7 +45,7 @@
Variant[String, Array[String]] $nginx_error_log = "${log_dir}/${nginx::params::nginx_error_log_file}",
Nginx::ErrorLogSeverity $nginx_error_log_severity = 'error',
$pid = $nginx::params::pid,
$proxy_temp_path = $nginx::params::proxy_temp_path,
Variant[Stdlib::Absolutepath, Boolean] $proxy_temp_path = $nginx::params::proxy_temp_path,
$root_group = $nginx::params::root_group,
$run_dir = $nginx::params::run_dir,
$sites_available_owner = $nginx::params::sites_available_owner,
Expand Down