mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Signed-off-by: Adam Miller <admiller@redhat.com>
This commit is contained in:
parent
cb460dee74
commit
2fe150a1ef
2 changed files with 8 additions and 5 deletions
|
@ -1,3 +1,4 @@
|
|||
---
|
||||
minor_changes:
|
||||
- "dnf - group removal does not work if group was installed with Ansible because of dnf upstream bug https://bugzilla.redhat.com/show_bug.cgi?id=1620324"
|
||||
- "dnf removal with wildcards now works: Fixes https://github.com/ansible/ansible/issues/27744"
|
||||
|
|
|
@ -548,11 +548,13 @@ class DnfModule(YumDnf):
|
|||
|
||||
# Disable repositories
|
||||
for repo_pattern in disablerepo:
|
||||
if repo_pattern:
|
||||
for repo in repos.get_matching(repo_pattern):
|
||||
repo.disable()
|
||||
|
||||
# Enable repositories
|
||||
for repo_pattern in enablerepo:
|
||||
if repo_pattern:
|
||||
for repo in repos.get_matching(repo_pattern):
|
||||
repo.enable()
|
||||
|
||||
|
@ -944,7 +946,7 @@ class DnfModule(YumDnf):
|
|||
|
||||
installed = self.base.sack.query().installed()
|
||||
for pkg_spec in pkg_specs:
|
||||
if installed.filter(name=pkg_spec):
|
||||
if ("*" in pkg_spec) or installed.filter(name=pkg_spec):
|
||||
self.base.remove(pkg_spec)
|
||||
|
||||
# Like the dnf CLI we want to allow recursive removal of dependent
|
||||
|
|
Loading…
Reference in a new issue