From 36d2f740b894212c1bf7cff4f7e9f0b4e946c0dc Mon Sep 17 00:00:00 2001 From: Hakula Chen Date: Thu, 11 Jul 2024 14:26:26 +0800 Subject: [PATCH] refactor(service_facts): minor change --- lib/ansible/modules/service_facts.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/ansible/modules/service_facts.py b/lib/ansible/modules/service_facts.py index 78d3a56a758..008e308d31b 100644 --- a/lib/ansible/modules/service_facts.py +++ b/lib/ansible/modules/service_facts.py @@ -446,9 +446,7 @@ def main(): ), supports_check_mode=True, ) - args = dict( - include_user=module.params['include_user'], - ) + params = module.params locale = get_best_parsable_locale(module) module.run_command_environ_update = dict(LANG=locale, LC_ALL=locale) @@ -457,7 +455,7 @@ def main(): for svc_module in service_modules: svcmod = svc_module(module) if isinstance(svcmod, SystemctlScanService): - svc = svcmod.gather_services(args['include_user']) + svc = svcmod.gather_services(params['include_user']) else: svc = svcmod.gather_services() if svc: