From 5936da31987219a0cfc9a7b1bdaee0c093d2ccf8 Mon Sep 17 00:00:00 2001 From: Amin Vakil Date: Fri, 26 Feb 2021 17:03:41 +0330 Subject: [PATCH] Fix module --- plugins/modules/packaging/os/yum_versionlock.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/modules/packaging/os/yum_versionlock.py b/plugins/modules/packaging/os/yum_versionlock.py index 19a3fc8cf0..92044c2829 100644 --- a/plugins/modules/packaging/os/yum_versionlock.py +++ b/plugins/modules/packaging/os/yum_versionlock.py @@ -96,7 +96,8 @@ class YumVersionLock: def ensure_state(self, package, command): """ Ensure package state """ packages = " ".join(package) - rc, out, err = self.module.run_command([self.yum_bin, "-q", "versionlock", command, packages]) + cmd = "%s -q versionlock %s %s" % (self.yum_bin, command, packages) + rc, out, err = self.module.run_command(cmd) if rc == 0: return True self.module.fail_json(msg="Error: " + to_native(err) + to_native(out))