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

Global Default Locale Configuration for PostgreSQL Databases #246

Closed

Conversation

oyale
Copy link

@oyale oyale commented May 23, 2023

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 oyale force-pushed the feat/lc_collate_global_variable branch 4 times, most recently from e568c66 to bf57f68 Compare May 23, 2023 11:25
@oyale
Copy link
Author

oyale commented May 23, 2023

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

@oyale oyale marked this pull request as ready for review May 23, 2023 11:30
@oyale oyale changed the title feat: add global default variable for lc_collate Global Default Locale Configuration for PostgreSQL Databases May 23, 2023
@oyale oyale force-pushed the feat/lc_collate_global_variable branch from bf57f68 to 91752d6 Compare May 23, 2023 11:39
@oyale oyale force-pushed the feat/lc_collate_global_variable branch 2 times, most recently from 2b0587c to 0beddd2 Compare May 23, 2023 11:45
@oyale oyale force-pushed the feat/lc_collate_global_variable branch from 0beddd2 to de93576 Compare May 23, 2023 11:47
@github-actions
Copy link

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 github-actions bot added the stale label Sep 22, 2023
@oyale
Copy link
Author

oyale commented Nov 17, 2023

Hey @geerlingguy!

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

Thanks! 😃

@github-actions github-actions bot removed the stale label Nov 17, 2023
Copy link

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 github-actions bot added the stale label Mar 22, 2024
Copy link

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 github-actions bot closed this May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant