-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
locale_gen
doesn't work on Gentoo targets if a specified locale doesn't exist in /etc/locale.gen
#2399
Comments
Files identified in the description: If these files are inaccurate, please update the |
/etc/locale.gen
/etc/locale.gen
locale_gen
doesn't support Gentoo targets if the specified locales don't exist in /etc/locale.gen
locale_gen
doesn't support Gentoo targets if the specified locales don't exist in /etc/locale.gen
locale_gen
doesn't work on Gentoo targets if a specified locale don't exist in /etc/locale.gen
As it's been stated in the PR you have mentioned and these lines: community.general/plugins/modules/system/locale_gen.py Lines 63 to 73 in 276880a
It's checking /usr/share/i18n/SUPPORTED in some circumstances, but I'm not sure if just changing it to also check /usr/share/i18n/SUPPORTED is fine or not as I don't have this file on my system (Arch Linux).
|
Maybe the best behavior would be to first check |
FYI it's also not available on CentOS 7, 8. |
FYI: on Debian, |
locale_gen
doesn't work on Gentoo targets if a specified locale don't exist in /etc/locale.gen
locale_gen
doesn't work on Gentoo targets if a specified locale doesn't exist in /etc/locale.gen
Files identified in the description: If these files are incorrect, please update the |
Originates from ansible/ansible-modules-extras#425 and is still an issue on a fresh Debian bookworm. Deleting the I stumbled over this, because a lot of African locales are missing. You have to pick the origin locale of the country that occupied their land in the past. I.e. |
Arch has /usr/share/i18n/SUPPORTED nowadays as well (reacting to my comment from 2021). |
Summary
The module
locale_gen
fails with the following message:The locale you've entered is not available on your system.
This issue has been discussed here: ansible/ansible#38931
There was a PR here: ansible/ansible#34146
Citing @s-hamann:
locale_gen
is looking inside/etc/locale.gen
for valid locales, but for Gentoo it should look inside/usr/share/i18n/SUPPORTED
.Issue Type
Bug Report
Component Name
locale_gen
Ansible Version
I don't use the most recent version of Ansible, but I've read the most recent
locale_gen
code and there's no case for Gentoo.Configuration
OS / Environment
target OS: Gentoo
/usr/share/i18n/SUPPORTED
on Gentoo/etc/locale.gen
on Gentoo:Steps to Reproduce
Expected Results
de_DE.UTF-8
should be added to/etc/locale.gen
if it exists in/usr/share/i18n/SUPPORTED
.Actual Results
Code of Conduct
The text was updated successfully, but these errors were encountered: