From 4ce8fa29c2a3149df3bd20a9e9020672ef438bcb Mon Sep 17 00:00:00 2001 From: "patchback[bot]" <45432694+patchback[bot]@users.noreply.github.com> Date: Fri, 5 Jun 2026 07:34:43 +0200 Subject: [PATCH] [PR #12182/4d66b3da backport][stable-13] opkg - path_prefix needs to be a list (#12190) opkg - path_prefix needs to be a list (#12182) * opkg - path_prefix needs to be a list path_prefix is passed to get_bin_path() which expects opt_dirs to be a list of paths. Passing in a string instead of a list of paths results in incorrect values being adding to the path when searching for the command to run. * Add changelog (cherry picked from commit 4d66b3dae8e9e25d6b76499dc0b071d883fbd44d) Co-authored-by: Sam Doran --- changelogs/fragments/12182-opkg-path-prefix.yml | 2 ++ plugins/modules/opkg.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/12182-opkg-path-prefix.yml diff --git a/changelogs/fragments/12182-opkg-path-prefix.yml b/changelogs/fragments/12182-opkg-path-prefix.yml new file mode 100644 index 0000000000..06661bdce0 --- /dev/null +++ b/changelogs/fragments/12182-opkg-path-prefix.yml @@ -0,0 +1,2 @@ +bugfixes: + - opkg - correctly set executable search path (https://github.com/ansible-collections/community.general/pull/12182). diff --git a/plugins/modules/opkg.py b/plugins/modules/opkg.py index ca1218303b..6c41e2138d 100644 --- a/plugins/modules/opkg.py +++ b/plugins/modules/opkg.py @@ -166,7 +166,7 @@ class Opkg(StateModuleHelper): update_cache=cmd_runner_fmt.as_bool("update"), version=cmd_runner_fmt.as_fixed("--version"), ), - path_prefix=dir, + path_prefix=[dir], ) with self.runner("version") as ctx: