riak: command args as list rather than string (#10603)

* riak: command args as list rather than string

* add changelog frag
This commit is contained in:
Alexei Znamensky 2025-08-10 23:36:01 +12:00 committed by GitHub
commit 6b7ec5648d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 1 deletions

View file

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

View file

@ -153,7 +153,7 @@ def main():
version=version) version=version)
if command == 'ping': if command == 'ping':
cmd = '%s ping %s' % (riak_bin, target_node) cmd = [riak_bin, 'ping', target_node]
rc, out, err = module.run_command(cmd) rc, out, err = module.run_command(cmd)
if rc == 0: if rc == 0:
result['ping'] = out result['ping'] = out