Skip to content

[ansible/postgres] PostgreSQL role forces invalid locale on RHEL 9 / Oracle Linux 9 #474

@ednillibanio

Description

@ednillibanio

When running the jfrog.platform.postgres role on Oracle Linux 9 (RHEL 9 compatible), PostgreSQL fails to start due to an invalid locale being written by the role.

Problematic task

- name: Fixup some locale issues
  ansible.builtin.lineinfile:
    dest: /etc/locale.conf
    line: "{{ item }}"
  loop:
    - LANG=en_us.UTF-8
    - LANGUAGE=en_us.UTF-8

To make this task work on Oracle Linux 9, I had to install the 'glibc-langpack-en' package so that the en_US.UTF-8 locale is available.
Also, locale names are case-sensitive, so the country code should be uppercase (en_US.UTF-8 instead of en_us.UTF-8).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions