mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Don't reset the system locale. Ansible needs that properly set.
Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
This commit is contained in:
parent
c63e801603
commit
31d5a70258
2 changed files with 5 additions and 1 deletions
|
@ -410,6 +410,7 @@ def playbooks(
|
|||
},
|
||||
"cwd": rundir,
|
||||
"cmd": " ".join(command),
|
||||
"reset_system_locale": False,
|
||||
}
|
||||
ret = __salt__["cmd.run_all"](**cmd_kwargs)
|
||||
log.debug("Ansible Playbook Return: %s", ret)
|
||||
|
@ -606,7 +607,9 @@ def _explore_path(path, playbook_extension, hosts_filename, syntax_check):
|
|||
check_command = ["ansible-playbook", "--syntax-check"]
|
||||
try:
|
||||
for pb in list(ret):
|
||||
if __salt__["cmd.retcode"](check_command + [ret[pb]]):
|
||||
if __salt__["cmd.retcode"](
|
||||
check_command + [ret[pb]], reset_system_locale=False
|
||||
):
|
||||
del ret[pb]
|
||||
except Exception as exc:
|
||||
raise CommandExecutionError(
|
||||
|
|
|
@ -36,6 +36,7 @@ def targets(inventory="/etc/ansible/hosts", yaml=False, export=False):
|
|||
inv = salt.modules.cmdmod.run(
|
||||
"ansible-inventory -i {} --list {}".format(inventory, " ".join(extra_cmd)),
|
||||
env={"ANSIBLE_DEPRECATION_WARNINGS": "0"},
|
||||
reset_system_locale=False,
|
||||
)
|
||||
if yaml:
|
||||
return salt.utils.stringutils.to_str(inv)
|
||||
|
|
Loading…
Add table
Reference in a new issue