Skip to content

Commit

Permalink
Restart postgres after locales generation
Browse files Browse the repository at this point in the history
Without this restart, trying to create a database using a new locale
leads to an error.
  • Loading branch information
Jamal-B committed Feb 14, 2024
1 parent a9656a9 commit 71553a4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tasks/configure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
- "{{ postgresql_locale }}"
- "{{ postgresql_ctype }}"
when: ansible_os_family == "Debian" and item != "C.UTF-8"
notify: restart postgresql

- name: PostgreSQL | Ensure the locale is generated | RedHat
become: yes
Expand All @@ -62,6 +63,9 @@
- { parts: "{{ postgresql_ctype_parts }}", locale_name: "{{ postgresql_ctype }}" }
when: ansible_os_family == "RedHat"
ignore_errors: yes
notify: restart postgresql

- meta: flush_handlers

- name: PostgreSQL | Stop PostgreSQL | Debian
service:
Expand Down

0 comments on commit 71553a4

Please sign in to comment.