-
Notifications
You must be signed in to change notification settings - Fork 271
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
add db_extra_options parameter #1195
base: master
Are you sure you want to change the base?
Conversation
110a480
to
cbd76b2
Compare
cbd76b2
to
98ed32c
Compare
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.
I was a bit slow getting back from the holiday break.
@@ -33,3 +34,6 @@ | |||
password: <%= stdlib::to_ruby($password) %> | |||
<% } -%> | |||
pool: <%= $db_pool %> | |||
<% $extra_options.each |String $k, String $v| { -%> | |||
<%= $k %>: <%= $v %> |
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.
Should this also use stdlib::to_ruby
to ensure things are quoted if needed? I don't trust unquoted strings with random input.
@@ -33,3 +34,6 @@ | |||
password: <%= stdlib::to_ruby($password) %> | |||
<% } -%> | |||
pool: <%= $db_pool %> | |||
<% $extra_options.each |String $k, String $v| { -%> |
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.
I'd trust the header a the top to enforce the type and avoid duplication.
<% $extra_options.each |String $k, String $v| { -%> | |
<% $extra_options.each |$k, $v| { -%> |
@@ -230,6 +233,7 @@ | |||
Optional[String[1]] $db_sslmode = undef, | |||
Optional[String[1]] $db_root_cert = undef, | |||
Optional[Integer[0]] $db_pool = undef, | |||
Hash[String, String] $db_extra_options = {}, |
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.
Are there options that are numbers? So something like this:
Hash[String, String] $db_extra_options = {}, | |
Hash[String, Variant[String, Integer]] $db_extra_options = {}, |
This PR adds a
db_extra_options
parameter, to allow adding custom parameters in the database.yml config.Fixes #1194