diff --git a/changelogs/fragments/3808-logstash_plugin-run_command-list.yaml b/changelogs/fragments/3808-logstash_plugin-run_command-list.yaml new file mode 100644 index 0000000000..9c92ab793a --- /dev/null +++ b/changelogs/fragments/3808-logstash_plugin-run_command-list.yaml @@ -0,0 +1,2 @@ +minor_changes: + - logstash_plugin - calling ``run_command`` with arguments as ``list`` instead of ``str`` (https://github.com/ansible-collections/community.general/pull/3808). diff --git a/plugins/modules/monitoring/logstash_plugin.py b/plugins/modules/monitoring/logstash_plugin.py index 5d1cd488ab..13b1233c1f 100644 --- a/plugins/modules/monitoring/logstash_plugin.py +++ b/plugins/modules/monitoring/logstash_plugin.py @@ -82,7 +82,7 @@ PACKAGE_STATE_MAP = dict( def is_plugin_present(module, plugin_bin, plugin_name): cmd_args = [plugin_bin, "list", plugin_name] - rc, out, err = module.run_command(" ".join(cmd_args)) + rc, out, err = module.run_command(cmd_args) return rc == 0