[PR #10526/4918ecd4 backport][stable-11] easy_install: command args as list rather than string (#10589)

easy_install: command args as list rather than string (#10526)

* easy_install: command args as list rather than string

* add changelog frag

(cherry picked from commit 4918ecd4c5)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
patchback[bot]
2025-08-04 20:50:48 +02:00
committed by GitHub
parent 81f66feea4
commit e0a86f172f
2 changed files with 3 additions and 1 deletions

View File

@@ -0,0 +1,2 @@
minor_changes:
- easy_install - using safer mechanism to run external command (https://github.com/ansible-collections/community.general/pull/10526).

View File

@@ -89,7 +89,7 @@ from ansible.module_utils.basic import AnsibleModule
def install_package(module, name, easy_install, executable_arguments):
cmd = '%s %s %s' % (easy_install, ' '.join(executable_arguments), name)
cmd = [easy_install] + executable_arguments + [name]
rc, out, err = module.run_command(cmd)
return rc, out, err