From 6b99d48f063ab5c5d020d862ab8721f5de9e7695 Mon Sep 17 00:00:00 2001 From: "patchback[bot]" <45432694+patchback[bot]@users.noreply.github.com> Date: Wed, 1 Dec 2021 07:09:49 +0100 Subject: [PATCH] logstash_plugin - invoke run_command passing list (#3808) (#3827) * logstash_plugin - invoke run_command passing list * added changelog fragment * rogue chglog frag escaped its caged and was seen running around into a different PR (cherry picked from commit c587d21ba047e8d7ef571f21be5e0883c59f7411) Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com> --- changelogs/fragments/3808-logstash_plugin-run_command-list.yaml | 2 ++ plugins/modules/monitoring/logstash_plugin.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/3808-logstash_plugin-run_command-list.yaml 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