Bug 1471017

Summary: Ansible DNF is not able to install package groups
Product: [Fedora] Fedora Reporter: Dirk Davidis <davidis.dirk>
Component: ansibleAssignee: Kevin Fenzi <kevin>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 26CC: a.badger, ademaria, athmanem, hhorak, j, kevin, mark, maxim, toromoti
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: ansible-2.3.2.0-1.fc26 ansible-2.3.2.0-1.el6 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-09-22 08:17:39 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Dirk Davidis 2017-07-14 09:29:55 UTC
Description of problem:

In Fedora 26 it is not possible to install DNF Package groups with Ansible. I tried several ways of typing the Groupname @ansible-node "Ansible Node" etc. following the specs from Ansible Documentation

Version-Release number of selected component (if applicable):

Ansible: 2.3.1.0


How reproducible:

ansible localhost -m dnf -a 'name=@ansible-node state=present'


Steps to Reproduce:
1.
2.
3.

Actual results:

ocalhost | FAILED! => {
    "changed": false, 
    "failed": true, 
    "module_stderr": "No handlers could be found for logger \"dnf\"\nTraceback (most recent call last):\n  File \"/tmp/ansible_KFzpp3/ansible_module_dnf.py\", line 493, in <module>\n    main()\n  File \"/tmp/ansible_KFzpp3/ansible_module_dnf.py\", line 489, in main\n    ensure(module, base, params['state'], params['name'])\n  File \"/tmp/ansible_KFzpp3/ansible_module_dnf.py\", line 350, in ensure\n    base.group_install(group, dnf.const.GROUP_PACKAGE_TYPES)\n  File \"/usr/lib/python2.7/site-packages/dnf/base.py\", line 1460, in group_install\n    strict)\n  File \"/usr/lib/python2.7/site-packages/dnf/comps.py\", line 90, in install_or_skip\n    return install_fnc(grp_or_env_id, types, exclude, strict)\n  File \"/usr/lib/python2.7/site-packages/dnf/comps.py\", line 600, in _group_install\n    raise ValueError(_(\"Group_id '%s' does not exist.\") % ucd(group_id))\nValueError: <exception str() failed>\n", 
    "module_stdout": "", 
    "msg": "MODULE FAILURE", 
    "rc": 0
}



Expected results:

Package Group should be installed.

Additional info:

My Playbooks are working on F25 without any issue.

Comment 1 Honza Horak 2017-07-15 10:25:44 UTC
Same issue here with '@rpm-development-tools', so name of the group does not matter probably.

Comment 2 Dirk Davidis 2017-07-15 10:58:38 UTC
@Honza, you are right, it doesnt matter which group, none of them is working,i tried several groups with different ways of writing the group name like @^... or "Group Name" none of them is working.

Comment 3 Kevin Fenzi 2017-07-18 17:12:47 UTC
https://github.com/ansible/ansible/issues/26868

Comment 4 Jason Tibbitts 2017-07-25 22:19:22 UTC
I submitted a pull request upstream: https://github.com/ansible/ansible/pull/27302

Testing is of course welcome; I tested against F24 and up but if anyone has anything older around it might be nice to make sure they don't break.  I did some koji scratch builds:

F25: https://koji.fedoraproject.org/koji/taskinfo?taskID=20730367
F26: https://koji.fedoraproject.org/koji/taskinfo?taskID=20730365
rawhide: https://koji.fedoraproject.org/koji/taskinfo?taskID=20730370

These contain my patch for this bug as well as the upstream fix for https://bugzilla.redhat.com/show_bug.cgi?id=1461116

Comment 5 Jason Tibbitts 2017-07-25 23:25:11 UTC
This was merged and will hopefully be in 2.3.2.

Comment 6 Fedora Update System 2017-08-13 04:03:18 UTC
ansible-2.3.2.0-1.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-322ae91a75

Comment 7 Fedora Update System 2017-08-24 15:50:58 UTC
ansible-2.3.2.0-1.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.

Comment 8 Fedora Update System 2017-09-05 22:42:38 UTC
ansible-2.3.2.0-1.el6 has been submitted as an update to Fedora EPEL 6. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-503601886f

Comment 9 Fedora Update System 2017-09-06 22:48:51 UTC
ansible-2.3.2.0-1.el6 has been pushed to the Fedora EPEL 6 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-503601886f

Comment 10 Fedora Update System 2017-09-22 08:17:39 UTC
ansible-2.3.2.0-1.el6 has been pushed to the Fedora EPEL 6 stable repository. If problems still persist, please make note of it in this bug report.