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.
pull/44523/head
Till Maas 6 years ago committed by Brian Coca
parent 2f9a5a75a8
commit 0fabf2109f

@ -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…
Cancel
Save