Skip to content

Commit

Permalink
Refs #33214: Reset puma min threads to default from puppet module
Browse files Browse the repository at this point in the history
If the default value for foreman_service_puma_threads_min is found,
which is zero, this deletes that value from the answers file. This
allows the new default to be populated from the puppet module. The
new default is to set min threads equal to max threads. If the minimum
is anything other than zero than we can assume the user has customized
the value.
  • Loading branch information
ehelms authored and wbclark committed Aug 11, 2021
1 parent fe6f99b commit dcd015c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
if answers['foreman'].is_a?(Hash)
if answers['foreman']['foreman_service_puma_threads_min'] == 0 ||
answers['foreman']['foreman_service_puma_threads_min'] == answers['foreman']['foreman_service_puma_threads_max']
answers['foreman'].delete('foreman_service_puma_threads_min')
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
if answers['foreman'].is_a?(Hash)
if answers['foreman']['foreman_service_puma_threads_min'] == 0 ||
answers['foreman']['foreman_service_puma_threads_min'] == answers['foreman']['foreman_service_puma_threads_max']
answers['foreman'].delete('foreman_service_puma_threads_min')
end
end

0 comments on commit dcd015c

Please sign in to comment.