diff --git a/plugins/modules/packaging/os/yum_versionlock.py b/plugins/modules/packaging/os/yum_versionlock.py index 77ff5a30b1..19a3fc8cf0 100644 --- a/plugins/modules/packaging/os/yum_versionlock.py +++ b/plugins/modules/packaging/os/yum_versionlock.py @@ -95,7 +95,8 @@ class YumVersionLock: def ensure_state(self, package, command): """ Ensure package state """ - rc, out, err = self.module.run_command([self.yum_bin, "-q", "versionlock", command, package]) + packages = " ".join(package) + rc, out, err = self.module.run_command([self.yum_bin, "-q", "versionlock", command, packages]) if rc == 0: return True self.module.fail_json(msg="Error: " + to_native(err) + to_native(out))