-
-
Notifications
You must be signed in to change notification settings - Fork 54
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
Define Stylesheet and language for Squid Errorpage #83
Conversation
manifests/init.pp
Outdated
@@ -11,6 +11,8 @@ | |||
Pattern[/\d+ KB/] $maximum_object_size_in_memory = $squid::params::maximum_object_size_in_memory, | |||
String $package_name = $squid::params::package_name, | |||
String $service_name = $squid::params::service_name, | |||
Optional[String] $error_directory = $squid::params::error_directory, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since you've made these parameters Optional
(which is a good idea), you should almost certainly default them to undef
.
templates/squid.conf.header.erb
Outdated
@@ -19,6 +19,10 @@ access_log <%= @access_log %> | |||
coredump_dir <%= @coredump_dir %> | |||
|
|||
<% end -%> | |||
|
|||
error_directory <%= @error_directory %> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and wrap these in suitable if
s
manifests/init.pp
Outdated
@@ -11,6 +11,8 @@ | |||
Pattern[/\d+ KB/] $maximum_object_size_in_memory = $squid::params::maximum_object_size_in_memory, | |||
String $package_name = $squid::params::package_name, | |||
String $service_name = $squid::params::service_name, | |||
Optional[String] $error_directory = $squid::params::error_directory, | |||
Optional[String] $err_page_stylesheet = $squid::params::err_page_stylesheet, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can use Stdlib::Absolutepath
instead of String
@SourceDoctor can you remove the labels if they are addressed. |
@traylenator i'd like to, but i can't find a button or something on to my pull request to do so |
templates/squid.conf.header.erb
Outdated
@@ -19,6 +19,14 @@ access_log <%= @access_log %> | |||
coredump_dir <%= @coredump_dir %> | |||
|
|||
<% end -%> | |||
|
|||
<% unless @error_directory.nil? -%> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a simple <% if @error_directory -%>
should be fine here. The default of undef
will be false
. THat looks to be how the other lines work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 unless @foo.nil?
is only needed if the parameter is a boolean.
Needs rebase, but otherwise looks good.
@alexjfisher i thought i did so ;-) |
It's been squashed but not rebased. |
now it should be :-) |
configure Language and Stylesheet for Squid Errorpages