mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-07-04 01:28:53 +00:00
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:
parent
e98e98757d
commit
826b99d4bd
3 changed files with 30 additions and 0 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue