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).