From c24b187f888ecf32e84a9409465be33ae8953ab1 Mon Sep 17 00:00:00 2001 From: Martin Krizek Date: Tue, 8 Jul 2025 10:58:19 +0200 Subject: [PATCH] dnf/dnf5: remove deprecated install_repoquery option (#85440) https://github.com/ansible/ansible/issues/85410 --- changelogs/fragments/dnf-remove-install_repoquery.yml | 2 ++ lib/ansible/module_utils/yumdnf.py | 5 ----- lib/ansible/modules/dnf.py | 7 ------- lib/ansible/modules/dnf5.py | 6 ------ test/sanity/ignore.txt | 2 -- 5 files changed, 2 insertions(+), 20 deletions(-) create mode 100644 changelogs/fragments/dnf-remove-install_repoquery.yml diff --git a/changelogs/fragments/dnf-remove-install_repoquery.yml b/changelogs/fragments/dnf-remove-install_repoquery.yml new file mode 100644 index 00000000000..b804acc3e0d --- /dev/null +++ b/changelogs/fragments/dnf-remove-install_repoquery.yml @@ -0,0 +1,2 @@ +removed_features: + - dnf/dnf5 - remove deprecated ``install_repoquery`` option. diff --git a/lib/ansible/module_utils/yumdnf.py b/lib/ansible/module_utils/yumdnf.py index b2cbba3fde2..bdcf5ad7f72 100644 --- a/lib/ansible/module_utils/yumdnf.py +++ b/lib/ansible/module_utils/yumdnf.py @@ -32,10 +32,6 @@ yumdnf_argument_spec = dict( enablerepo=dict(type='list', elements='str', default=[]), exclude=dict(type='list', elements='str', default=[]), installroot=dict(type='str', default="/"), - install_repoquery=dict( - type='bool', default=True, - removed_in_version='2.20', removed_from_collection='ansible.builtin', - ), install_weak_deps=dict(type='bool', default=True), list=dict(type='str'), name=dict(type='list', elements='str', aliases=['pkg'], default=[]), @@ -85,7 +81,6 @@ class YumDnf(metaclass=ABCMeta): self.enablerepo = self.module.params.get('enablerepo', []) self.exclude = self.module.params['exclude'] self.installroot = self.module.params['installroot'] - self.install_repoquery = self.module.params['install_repoquery'] self.install_weak_deps = self.module.params['install_weak_deps'] self.list = self.module.params['list'] self.names = [p.strip() for p in self.module.params['name']] diff --git a/lib/ansible/modules/dnf.py b/lib/ansible/modules/dnf.py index 07f0384b5c9..1922ba85e79 100644 --- a/lib/ansible/modules/dnf.py +++ b/lib/ansible/modules/dnf.py @@ -211,13 +211,6 @@ options: type: bool default: "no" version_added: "2.7" - install_repoquery: - description: - - This is effectively a no-op in DNF as it is not needed with DNF. - - This option is deprecated and will be removed in ansible-core 2.20. - type: bool - default: "yes" - version_added: "2.7" download_only: description: - Only download the packages, do not install them. diff --git a/lib/ansible/modules/dnf5.py b/lib/ansible/modules/dnf5.py index a0e4a4ef5aa..cd9bf6e3f2e 100644 --- a/lib/ansible/modules/dnf5.py +++ b/lib/ansible/modules/dnf5.py @@ -180,12 +180,6 @@ options: in the earlier transaction). type: bool default: "no" - install_repoquery: - description: - - This is effectively a no-op in DNF as it is not needed with DNF. - - This option is deprecated and will be removed in ansible-core 2.20. - type: bool - default: "yes" download_only: description: - Only download the packages, do not install them. diff --git a/test/sanity/ignore.txt b/test/sanity/ignore.txt index c75cef48855..0751ca5b155 100644 --- a/test/sanity/ignore.txt +++ b/test/sanity/ignore.txt @@ -240,5 +240,3 @@ lib/ansible/utils/py3compat.py pylint:ansible-deprecated-version # TODO: 2.20 lib/ansible/utils/ssh_functions.py pylint:ansible-deprecated-version # TODO: 2.20 lib/ansible/vars/manager.py pylint:ansible-deprecated-version-comment # TODO: 2.20 lib/ansible/vars/plugins.py pylint:ansible-deprecated-version # TODO: 2.20 -lib/ansible/modules/dnf.py validate-modules:ansible-deprecated-version # TODO: 2.20 -lib/ansible/modules/dnf5.py validate-modules:ansible-deprecated-version # TODO: 2.20