diff --git a/lib/ansible/modules/packaging/os/yum.py b/lib/ansible/modules/packaging/os/yum.py index 87cb485825..bf199d8dc4 100644 --- a/lib/ansible/modules/packaging/os/yum.py +++ b/lib/ansible/modules/packaging/os/yum.py @@ -347,7 +347,7 @@ def is_group_env_installed(name, conf_file, installroot='/'): name_lower = name.lower() my = yum_base(conf_file, installroot) - if yum.__version__ >= '3.4': + if yum.__version_info__ >= (3, 4): groups_list = my.doGroupLists(return_evgrps=True) else: groups_list = my.doGroupLists() @@ -358,7 +358,7 @@ def is_group_env_installed(name, conf_file, installroot='/'): if name_lower.endswith(group.name.lower()) or name_lower.endswith(group.groupid.lower()): return True - if yum.__version__ >= '3.4': + if yum.__version_info__ >= (3, 4): # list of the installed env_groups on the third index envs = groups_list[2] for env in envs: