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)