ansible-role-postgresql icon indicating copy to clipboard operation
ansible-role-postgresql copied to clipboard

Global Default Locale Configuration for PostgreSQL Databases

Open oyale opened this issue 1 year ago • 3 comments

Hello,

This Pull Request introduces a refinement to the Ensure PostgreSQL databases are present task, providing an option for setting a global default locale. While the existing role does permit locale modification at the individual database level, I observed that there are use cases where one might need to change the default locale across all databases without having to specify lc_collate and lc_ctype for each one. This led me to propose this enhancement.

The following lines in databases.yml have been updated to use the new postgresql_default_locale variable when individual lc_collate and lc_ctype values are not provided:

lc_collate: "{{ item.lc_collate | default(postgresql_default_locale) }}"
lc_ctype: "{{ item.lc_ctype | default(postgresql_default_locale) }}"

I have added the postgresql_default_locale variable to the defaults/main.yml file. This new variable allows users to define a global default locale:

postgresql_default_locale: 'en_US.UTF-8'

Additionally, I have updated the README to explain the purpose of this new variable and how to use it. The documentation clarifies that postgresql_default_locale is used to set default lc_collate and lc_ctype values for all databases, unless specifically overridden for a particular database.

This modification aims to increase the role's versatility and simplify PostgreSQL database configuration by offering a global default locale setting.

I look forward to hearing your thoughts on this proposed change.

Thank you.

oyale avatar May 23 '23 11:05 oyale

Just pushed a new commit to fix the linter errors related to indentation in the tasks/variables.yml file.

oyale avatar May 23 '23 11:05 oyale

This pr has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!

Please read this blog post to see the reasons why I mark issues as stale.

github-actions[bot] avatar Sep 22 '23 19:09 github-actions[bot]

Hey @geerlingguy!

Could you take some time to do a review of this PR?

Thanks! :smiley:

oyale avatar Nov 17 '23 18:11 oyale

This pr has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!

Please read this blog post to see the reasons why I mark issues as stale.

github-actions[bot] avatar Mar 22 '24 19:03 github-actions[bot]

This pr has been closed due to inactivity. If you feel this is in error, please reopen the issue or file a new issue with the relevant details.

github-actions[bot] avatar May 24 '24 19:05 github-actions[bot]