From 916b1e34bd848f7366ac76a4a8e06d32d781bdcf 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 (cherry picked from commit 0e3e646189552950a9ae2e681a21554b2003d910) 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 c59608eb1a1..bbd693c5f95 100644 --- a/lib/ansible/module_utils/yumdnf.py +++ b/lib/ansible/module_utils/yumdnf.py @@ -22,7 +22,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 4e2b906f0e0..c1c248afed2 100644 --- a/lib/ansible/modules/packaging/os/dnf.py +++ b/lib/ansible/modules/packaging/os/dnf.py @@ -149,7 +149,6 @@ options: - 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. required: false - 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 d34db734702..f6b93d5ea1f 100644 --- a/lib/ansible/modules/packaging/os/yum.py +++ b/lib/ansible/modules/packaging/os/yum.py @@ -183,7 +183,6 @@ options: - 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. required: false - choices: [ all, main, repoid ] version_added: "2.7" download_only: description: