-
Notifications
You must be signed in to change notification settings - Fork 686
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
Ansible scripts depend on English locale #4219
Comments
Replicated, error message is:
|
Replicated as follows (against an existing Trusty instance for expediency's sake):
It should be safe to restore locale settings after the fact if required, but as the Ansible playbook stands it would be necessary to change locale settings again before each Locale behaviour after a |
I believe I've worked out how to control the locale during Ansible execution, so that the servers can be installed with a non-English locale. This should mean there'll be no need for changing the locale just to run It does of course mean that command output will be in English, but given that all of the Ansible output is in English, this shouldn't greatly reduce the usability. There are also a few new warnings about the raw module not supporting the environment keyword; this is because the environment module is being used at the top of plays, and the warnings are harmless. I've tested it on fresh Trusty installs in a few locales (no, de, fr) and checked it again after upgrading to Xenial. It seems to work throughout. |
Description
After the upgrade to xenial and 0.12.0, ./securedrop-admin install fails on the ‘tor-hidden-services: Ensure correct Tor version installed’ step.
It turns out both app and mon had /etc/default/profile written with some local locale settings (LANG=nb_NO.UTF-8). The unprivileged user does not use these settings, but when the ansible script escalates privileges, env is set with this locale. This, in turn, makes the script in
ansible_base/installed_files/ansible_base/tor-hidden-services/tasks/install-tor.yml
fail, because it explicitly tests forinstalled
.I am not sure why the default profile was written this way, or why it changed between versions of Ubuntu. I do however believe I had to set the keyboard langauge during initial setup (due to an automated password with characters I had no idea how to type on an English keyboard with a physical Norwegian layout). I know I could possibly have changed the keyboard layout without changing the locale, but the docs did not instruct me to not change it. Anyway, I don't think it's good to require users to keep the locale at English, and that locale-dependent scripts should be fixed.
A possible replacement for manually parsing apt-cache is apt-list, which has a slightly less human output.
The text was updated successfully, but these errors were encountered: