Sanitize locale before running ansible

Issue #3 new
Till Maas created an issue

Currently rbac-playbook uses the user's locale. This might cause problems when the output of programs is parsed in playbooks, see for example: https://github.com/ansible/ansible/issues/19478

The output was this for example:

TASK [keytab/service : Create host entry _raw_params=ipa host-add {{host}}] ****
Saturday 17 December 2016  17:54:13 +0000 (0:00:01.596)       0:01:39.805 *****
fatal: [koji02.phx2.fedoraproject.org -> ipa01.phx2.fedoraproject.org]: FAILED! => {"changed": false, "cmd": ["ipa", "host-add", "koji.fedoraproject.org"], "delta": "0:00:02.436066", "end": "2016-12-17 17:54:16.364118", "failed": true, "failed_when_result": true, "rc": 1, "start": "2016-12-17 17:54:13.928052", "stderr": "ipa: ERROR: host mit dem Namen »koji.fedoraproject.org« existiert bereits", "stdout": "", "stdout_lines": [], "warnings": []}

This worked:

LANG=C sudo rbac-playbook groups/koji-hub.yml

Comments (0)

  1. Log in to comment