# On CentOS 6 'yum groupremove "Development Tools"' fails when groupremove_leaf_only
# isn't enabled, that's why a package belonging to "Development Tools" (autoconf)
# is removed instead of the whole group.
- name:remove installed group
yum:
name:"@Development tools"
state:absent
when:
- (ansible_distribution in ['RedHat', 'CentOS', 'ScientificLinux'] and ansible_distribution_major_version|int > 6) or ansible_distribution in ['Fedora']
- name:remove a package from a group
yum:
name:'autoconf'
state:absent
when:
- ansible_distribution in ['RedHat', 'CentOS', 'ScientificLinux'] and ansible_distribution_major_version|int <= 6
- (ansible_distribution in ['RedHat', 'CentOS', 'ScientificLinux'] or (ansible_distribution in ['Fedora'] and ansible_distribution_major_version|int < 23))
- ansible_python.version.major == 2
# el6 has a broken yum group implementation, when you try to remove a group it goes through
# deps and ends up with trying to remove yum itself and the whole process fails
# so don't run the yum group remove tests there
- include:'yum_group_remove.yml'
when:
- (ansible_distribution in ['RedHat', 'CentOS', 'ScientificLinux'] and ansible_distribution_major_version|int > 6) or ansible_distribution in ['Fedora']