-
Notifications
You must be signed in to change notification settings - Fork 1.5k
locale_gen fails to generate a locale on Ubuntu if locale.gen exists #425
Comments
A temporary workaround is, to not rely on the ansible module for generating the locales. TYPO3 has a commit with workaround: https://github.com/typo3-ci/infrastructure/commit/648dce2637a3c47edcb924697afc8df73ac759fc |
Even easier option is to just delete |
Any news of accepted PR ? |
👍 (happens on strato.de VPS as well) |
Get the same error on Ubuntu, done nothing special before now, just giving Going to use this workaround instead of deleting https://github.com/typo3-ci/infrastructure/commit/648dce2637a3c47edcb924697afc8df73ac759fc |
@AugustusKling, ping. This issue is still waiting on your response. |
@AugustusKling, ping. This issue is still waiting on your response. |
If I could add something here, I'd like to say that it affects version 2.1.2.0 as well. |
@AugustusKling, ping. This issue is still waiting on your response. |
2 similar comments
@AugustusKling, ping. This issue is still waiting on your response. |
@AugustusKling, ping. This issue is still waiting on your response. |
@AugustusKling, ping. This issue is still waiting on your response. |
This repository has been locked. All new issues and pullrequests should be filed in https://github.com/ansible/ansible Please read through the repomerge page in the dev guide. The guide contains links to tools which automatically move your issue or pullrequest to the ansible/ansible repo. |
This affects Ansible |
This issue was migrated to ansible/ansible#29200 |
Issue Type:
Bug Report
Ansible Version:
1.9.0.1
Environment:
Ubuntu 14.04
Summary:
locale_gen
fails to generate locale on Ubuntu if you attempt to generate a new locale which is not present in/etc/locale.gen
(which is normally not used by Ubuntu).Steps To Reproduce:
On fresh Ubuntu system, create an empty file
/etc/locale.gen
file and execute locale_gen with any locale, e.g.:Expected Results:
The module should generate locale without an error as long
locales
package is installed.Actual Results:
The module fails with message
The locales you've entered is not available on your system.
even when the locale is available on the system.This seems to be relevant to ansible/ansible#7289. File
/etc/locale.gen
is normally not present on Ubuntu system, however it can be part of setup by provider (in my case, it was on the VPS by OVH). If that file is present, the module will assume that the system is not Ubuntu and read/etc/locale.gen
for the list of locales available for generation – however, that list may be stale or empty, the module should always look to the file/usr/share/i18n/SUPPORTED
instead.The critical path seems to be on lines 157-165 – maybe the code should check SUPPORTED file first or look for something else; probably the best option would be an output from
locale -a
which returns an actual list of locales available on the system.The text was updated successfully, but these errors were encountered: