From 0e3e646189552950a9ae2e681a21554b2003d910 Mon Sep 17 00:00:00 2001 From: Adam Miller Date: Tue, 23 Oct 2018 11:39:55 -0500 Subject: [PATCH] don't restrict disable_excludes choices incorrectly (#47453) * don't restrict disable_excludes choices incorrectly Fixes #47085 Signed-off-by: Adam Miller --- changelogs/fragments/dnfyum-disable-excludes.yaml | 3 +++ lib/ansible/module_utils/yumdnf.py | 2 +- lib/ansible/modules/packaging/os/dnf.py | 1 - lib/ansible/modules/packaging/os/yum.py | 1 - 4 files changed, 4 insertions(+), 3 deletions(-) create mode 100644 changelogs/fragments/dnfyum-disable-excludes.yaml diff --git a/changelogs/fragments/dnfyum-disable-excludes.yaml b/changelogs/fragments/dnfyum-disable-excludes.yaml new file mode 100644 index 00000000000..e4b4d367db0 --- /dev/null +++ b/changelogs/fragments/dnfyum-disable-excludes.yaml @@ -0,0 +1,3 @@ +--- +minor_changes: + - "dnf appropriately handles disable_excludes repoid argument" diff --git a/lib/ansible/module_utils/yumdnf.py b/lib/ansible/module_utils/yumdnf.py index c71f62bee73..b60c1e4248a 100644 --- a/lib/ansible/module_utils/yumdnf.py +++ b/lib/ansible/module_utils/yumdnf.py @@ -24,7 +24,7 @@ yumdnf_argument_spec = dict( autoremove=dict(type='bool', default=False), bugfix=dict(required=False, type='bool', default=False), conf_file=dict(type='str'), - disable_excludes=dict(type='str', default=None, choices=['all', 'main', 'repoid']), + disable_excludes=dict(type='str', default=None), disable_gpg_check=dict(type='bool', default=False), disable_plugin=dict(type='list', default=[]), disablerepo=dict(type='list', default=[]), diff --git a/lib/ansible/modules/packaging/os/dnf.py b/lib/ansible/modules/packaging/os/dnf.py index fb7fa34ac04..1cfa90d7ce9 100644 --- a/lib/ansible/modules/packaging/os/dnf.py +++ b/lib/ansible/modules/packaging/os/dnf.py @@ -142,7 +142,6 @@ options: - If set to C(all), disables all excludes. - If set to C(main), disable excludes defined in [main] in yum.conf. - If set to C(repoid), disable excludes defined for given repo id. - choices: [ all, main, repoid ] version_added: "2.7" validate_certs: description: diff --git a/lib/ansible/modules/packaging/os/yum.py b/lib/ansible/modules/packaging/os/yum.py index e167e35c51e..409f1180546 100644 --- a/lib/ansible/modules/packaging/os/yum.py +++ b/lib/ansible/modules/packaging/os/yum.py @@ -175,7 +175,6 @@ options: - If set to C(all), disables all excludes. - If set to C(main), disable excludes defined in [main] in yum.conf. - If set to C(repoid), disable excludes defined for given repo id. - choices: [ all, main, repoid ] version_added: "2.7" download_only: description: