Bug 1337474 - dnf: state=present|absent returns skipping instead of changed
Summary: dnf: state=present|absent returns skipping instead of changed
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: ansible
Version: 23
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Kevin Fenzi
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-05-19 09:35 UTC by Laurentiu Pancescu
Modified: 2016-06-18 18:59 UTC (History)
6 users (show)

Fixed In Version: ansible-2.1.0.0-1.fc23 ansible-2.1.0.0-1.el7 ansible-2.1.0.0-1.fc22 ansible-2.1.0.0-1.el6 ansible-2.1.0.0-1.fc24
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-05-31 19:57:05 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Laurentiu Pancescu 2016-05-19 09:35:34 UTC
Description of problem:
Ansible's dnf module displays "skipping" instead of "changed" as status, when installing or removing packages (although it performs the requested action).

Version-Release number of selected component (if applicable):
2.0.2.0-1.fc23

How reproducible:


Steps to Reproduce:
I'm using Ansible with something like this in a role task:

- name: install devel packages
  dnf: name={{ item }} state=present
  with_items:
  - vim-enhanced
  - git-all
  - mercurial

- name: enable COPR for CentOS Packager
  command: dnf -y copr enable bstinson/centos-packager

- name: install tools for CentOS development
  dnf: name=centos-packager state=present

- name: remove unwanted packages
  dnf: name={{ item }} state=absent
  with_items:
  - midori
  - abiword
  - gnumeric

- name: install office packages
  dnf: name={{ item }} state=present
  with_items:
  - @LibreOffice
  - gnucash


Actual results:
When running ansible-playbook on a freshly installed F23 XFCE Spin, it installs and removes the packages as requested (I checked via "dnf list installed <package>"), but it displays "skipping" as a result, instead of "changed". The only package for which it displays the correct status as "changed" is centos-packager (all the other ones come from the official F23 repos and return "skipping").

If I run ansible-playbook again, it displays "ok" for all packages, as expected.


Expected results:
The status should be "changed" when packages were installed or removed, just like in previous versions of Ansible (both 1.9.x and 2.0.x).

Additional info:

Comment 1 Kevin Fenzi 2016-05-20 19:30:16 UTC
This is I think https://github.com/ansible/ansible/issues/15211 upstream. 

It's already fixed in devel and will be fixed in the upcoming 2.1 release. 

Since 2.1 is going to come out pretty soon, I'd prefer to just wait for that rather than backporting.

Comment 2 Laurentiu Pancescu 2016-05-22 05:29:42 UTC
Thanks. I had thought it's a bug in the dnf module, so I only looked at the list of upstream issues in ansible-modules-extra.

Comment 3 Fedora Update System 2016-05-25 16:19:44 UTC
ansible-2.1.0.0-1.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-1f9a2eb8d7

Comment 4 Fedora Update System 2016-05-25 16:20:05 UTC
ansible-2.1.0.0-1.el6 has been submitted as an update to Fedora EPEL 6. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-d31dacfabf

Comment 5 Fedora Update System 2016-05-25 16:20:21 UTC
ansible-2.1.0.0-1.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-5a1e887dfc

Comment 6 Fedora Update System 2016-05-25 16:20:38 UTC
ansible-2.1.0.0-1.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-aceff68672

Comment 7 Fedora Update System 2016-05-25 16:20:56 UTC
ansible-2.1.0.0-1.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2016-9b87ab9c77

Comment 8 Fedora Update System 2016-05-26 04:53:43 UTC
ansible-2.1.0.0-1.fc22 has been pushed to the Fedora 22 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-2016-9b87ab9c77

Comment 9 Fedora Update System 2016-05-26 05:01:01 UTC
ansible-2.1.0.0-1.fc23 has been pushed to the Fedora 23 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-2016-aceff68672

Comment 10 Fedora Update System 2016-05-26 05:01:24 UTC
ansible-2.1.0.0-1.fc24 has been pushed to the Fedora 24 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-2016-1f9a2eb8d7

Comment 11 Fedora Update System 2016-05-26 11:46:37 UTC
ansible-2.1.0.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-2016-d31dacfabf

Comment 12 Fedora Update System 2016-05-26 11:47:27 UTC
ansible-2.1.0.0-1.el7 has been pushed to the Fedora EPEL 7 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-2016-5a1e887dfc

Comment 13 Fedora Update System 2016-05-31 19:56:53 UTC
ansible-2.1.0.0-1.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.

Comment 14 Fedora Update System 2016-06-10 06:48:02 UTC
ansible-2.1.0.0-1.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.

Comment 15 Fedora Update System 2016-06-12 22:52:37 UTC
ansible-2.1.0.0-1.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.

Comment 16 Fedora Update System 2016-06-13 03:18:55 UTC
ansible-2.1.0.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.

Comment 17 Fedora Update System 2016-06-18 18:58:01 UTC
ansible-2.1.0.0-1.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.