dnf: fix wildcard matching for state: absent (#56013)

* dnf: fix wildcard matching for state: absent

Fixes #55938

* Add changelog...

* Fix sanity check failure...
This commit is contained in:
Martin Krizek
2019-05-14 23:34:11 +02:00
committed by ansibot
parent e98e98757d
commit 826b99d4bd
3 changed files with 30 additions and 0 deletions

View File

@@ -256,6 +256,26 @@
that:
- rpm_main_result.rc == 0
- rpm_weak_result.rc == 1 # the weak dependency shouldn't be installed
# https://github.com/ansible/ansible/issues/55938
- name: Install foo-*
dnf:
name: foo-*
state: present
- name: Uninstall foo-*
dnf:
name: foo-*
state: absent
- name: Check if all foo packages are removed
shell: rpm -qa foo-* | wc -l
register: rpm_result
- name: Verify rpm result
assert:
that:
- rpm_result.stdout == '0'
always:
- name: Clean up
dnf: