From ec35cbc4378afa962f35739a619d20d4454b298b Mon Sep 17 00:00:00 2001 From: Kevin Dwyer Date: Mon, 15 Jul 2019 06:02:14 -0400 Subject: [PATCH] Pass allow_unauthenticated when installing a deb directly - allowing unauthenticated dependencies (#58771) * Pass allow_unauthenticated when installing a deb directly - allowing unauthenticated dependencies. * Add changelog for ansible/ansible#58771 --- changelogs/fragments/58771-allow-unauthenticated-deb.yaml | 2 ++ lib/ansible/modules/packaging/os/apt.py | 1 + 2 files changed, 3 insertions(+) create mode 100644 changelogs/fragments/58771-allow-unauthenticated-deb.yaml diff --git a/changelogs/fragments/58771-allow-unauthenticated-deb.yaml b/changelogs/fragments/58771-allow-unauthenticated-deb.yaml new file mode 100644 index 00000000000..8380b073a48 --- /dev/null +++ b/changelogs/fragments/58771-allow-unauthenticated-deb.yaml @@ -0,0 +1,2 @@ +bugfixes: + - apt - fixed issue where allow_unauthenticated did not apply to dependencies when installing a deb directly diff --git a/lib/ansible/modules/packaging/os/apt.py b/lib/ansible/modules/packaging/os/apt.py index cc43e1c1427..88c6ea87a7d 100644 --- a/lib/ansible/modules/packaging/os/apt.py +++ b/lib/ansible/modules/packaging/os/apt.py @@ -750,6 +750,7 @@ def install_deb(m, debs, cache, force, install_recommends, allow_unauthenticated if deps_to_install: (success, retvals) = install(m=m, pkgspec=deps_to_install, cache=cache, install_recommends=install_recommends, + allow_unauthenticated=allow_unauthenticated, dpkg_options=expand_dpkg_options(dpkg_options)) if not success: m.fail_json(**retvals)