ANXS / postgresql

Fairly full featured Ansible role for Postgresql.
http://anxs.io/
MIT License
849 stars 573 forks source link

Fix using C.UTF-8 in Debian/Ubuntu #431

Closed maglub closed 5 years ago

maglub commented 5 years ago

This will allow the use of C.UTF-8 on Debian and Ubuntu, as discussed in #430

https://github.com/ANXS/postgresql/issues/430

The background is that the ansible module locale_gen fails when checking for the availability of C.UTF-8, which can be assumed to exist on all systems.

gclough commented 5 years ago

Seems reasonable... are there any objections from those with Debian knowledge?

maglub commented 5 years ago

I did some more research.

The C.UTF-8 locale is part of the libc-bin package in Debian, which is marked as "essential", which in turn means that it is always installed.

admin.mlue@com-icinga-l01:~$ dpkg -L libc-bin | grep locale
/usr/bin/locale
/usr/bin/localedef
/usr/lib/locale
/usr/lib/locale/C.UTF-8
/usr/lib/locale/C.UTF-8/LC_ADDRESS
/usr/lib/locale/C.UTF-8/LC_COLLATE
/usr/lib/locale/C.UTF-8/LC_CTYPE
/usr/lib/locale/C.UTF-8/LC_IDENTIFICATION
/usr/lib/locale/C.UTF-8/LC_MEASUREMENT
/usr/lib/locale/C.UTF-8/LC_MESSAGES
/usr/lib/locale/C.UTF-8/LC_MESSAGES/SYS_LC_MESSAGES
/usr/lib/locale/C.UTF-8/LC_MONETARY
/usr/lib/locale/C.UTF-8/LC_NAME
/usr/lib/locale/C.UTF-8/LC_NUMERIC
/usr/lib/locale/C.UTF-8/LC_PAPER
/usr/lib/locale/C.UTF-8/LC_TELEPHONE
/usr/lib/locale/C.UTF-8/LC_TIME

So we are good. It is always there.