mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Fix module
This commit is contained in:
parent
f8eeda3776
commit
5936da3198
1 changed files with 2 additions and 1 deletions
|
@ -96,7 +96,8 @@ class YumVersionLock:
|
||||||
def ensure_state(self, package, command):
|
def ensure_state(self, package, command):
|
||||||
""" Ensure package state """
|
""" Ensure package state """
|
||||||
packages = " ".join(package)
|
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:
|
if rc == 0:
|
||||||
return True
|
return True
|
||||||
self.module.fail_json(msg="Error: " + to_native(err) + to_native(out))
|
self.module.fail_json(msg="Error: " + to_native(err) + to_native(out))
|
||||||
|
|
Loading…
Reference in a new issue