Skip to content
Snippets Groups Projects
Unverified Commit eb5463d9 authored by Thomas Woerner's avatar Thomas Woerner Committed by GitHub
Browse files

Merge pull request #520 from rjeffman/fix_ansible_locale_over_ssh

Force plugins to execute using LANGUAGE='C'.
parents 73a19692 09942c3d
No related branches found
No related tags found
No related merge requests found
......@@ -93,6 +93,9 @@ except ImportError:
if six.PY3:
unicode = str
# ansible-freeipa requires locale to be C, IPA requires utf-8.
os.environ["LANGUAGE"] = "C"
def valid_creds(module, principal): # noqa
"""Get valid credentials matching the princial, try GSSAPI first."""
......
---
- name: Test language variations
hosts: ipaserver
tasks:
- name: Ensure a host is not present, with language set to "de_DE".
ipahost:
ipaadmin_password: SomeADMINpassword
name: nonexistent
state: absent
environment:
LANGUAGE: "de_DE"
register: result
failed_when: result.failed or result.changed
- name: Ensure a host is not present, with language set to "C".
ipahost:
ipaadmin_password: SomeADMINpassword
name: nonexistent
state: absent
environment:
LANGUAGE: "C"
register: result
failed_when: result.failed or result.changed
- name: Ensure a host is not present, using controller language.
ipahost:
ipaadmin_password: SomeADMINpassword
name: nonexistent
state: absent
register: result
failed_when: result.failed or result.changed
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment