mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user