mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-27 04:41:26 -07:00
yum: use the C locale when screen scraping (#32203)
This commit is contained in:
parent
162ca628d4
commit
a8ab1a0b20
1 changed files with 2 additions and 1 deletions
|
@ -1115,7 +1115,8 @@ def latest(module, items, repoq, yum_basecmd, conf_file, en_repos, dis_repos, up
|
||||||
res['changed'] = True
|
res['changed'] = True
|
||||||
elif pkgs['install'] or will_update:
|
elif pkgs['install'] or will_update:
|
||||||
cmd = yum_basecmd + ['install'] + pkgs['install'] + pkgs['update']
|
cmd = yum_basecmd + ['install'] + pkgs['install'] + pkgs['update']
|
||||||
rc, out, err = module.run_command(cmd)
|
lang_env = dict(LANG='C', LC_ALL='C', LC_MESSAGES='C')
|
||||||
|
rc, out, err = module.run_command(cmd, environ_update=lang_env)
|
||||||
out_lower = out.strip().lower()
|
out_lower = out.strip().lower()
|
||||||
if not out_lower.endswith("no packages marked for update") and \
|
if not out_lower.endswith("no packages marked for update") and \
|
||||||
not out_lower.endswith("nothing to do"):
|
not out_lower.endswith("nothing to do"):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue