mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 05:42:50 +00:00
yum: fix false error msg about autoremove support (#56459)
* yum: fix false error msg about autoremove support
This commit is contained in:
@@ -1083,9 +1083,8 @@ class YumModule(YumDnf):
|
||||
res['msg'] = err
|
||||
|
||||
if rc != 0:
|
||||
if self.autoremove:
|
||||
if 'No such command' not in out:
|
||||
self.module.fail_json(msg='Version of YUM too old for autoremove: Requires yum 3.4.3 (RHEL/CentOS 7+)')
|
||||
if self.autoremove and 'No such command' in out:
|
||||
self.module.fail_json(msg='Version of YUM too old for autoremove: Requires yum 3.4.3 (RHEL/CentOS 7+)')
|
||||
else:
|
||||
self.module.fail_json(**res)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user