service_facts: Use LC_ALL/LANG=C to run commands (#44474)
This allows to parse the output when the user's locale changes the commands' output. For example chkconfig uses 'Ein' and 'Aus' instead of 'on' and 'off' when using LANG=de_DE.UTF-8 breaking the service detection on RHEL 6.
This commit is contained in:
parent
2f9a5a75a8
commit
0fabf2109f
1 changed files with 1 additions and 0 deletions
|
@ -202,6 +202,7 @@ class SystemctlScanService(BaseService):
|
|||
|
||||
def main():
|
||||
module = AnsibleModule(argument_spec=dict(), supports_check_mode=True)
|
||||
module.run_command_environ_update = dict(LANG="C", LC_ALL="C")
|
||||
service_modules = (ServiceScanService, SystemctlScanService)
|
||||
all_services = {}
|
||||
incomplete_warning = False
|
||||
|
|
Loading…
Reference in a new issue