diff --git a/lib/ansible/modules/apt_key.py b/lib/ansible/modules/apt_key.py index cc1582c5b1a..4b84cb2e48b 100644 --- a/lib/ansible/modules/apt_key.py +++ b/lib/ansible/modules/apt_key.py @@ -27,7 +27,7 @@ attributes: platform: platforms: debian notes: - - The apt-key command has been deprecated and suggests to 'manage keyring files in trusted.gpg.d instead'. See the Debian wiki for details. + - The apt-key command used by this module has been deprecated. See the L(Debian wiki,https://wiki.debian.org/DebianRepository/UseThirdParty) for details. This module is kept for backwards compatibility for systems that still use apt-key as the main way to manage apt repository keys. - As a sanity check, downloaded key id must match the one specified. - "Use full fingerprint (40 characters) key ids to avoid key collisions. @@ -36,6 +36,8 @@ notes: - Adding a new key requires an apt cache update (e.g. using the M(ansible.builtin.apt) module's update_cache option). requirements: - gpg +seealso: + - module: ansible.builtin.deb822_repository options: id: description: @@ -81,12 +83,12 @@ options: ''' EXAMPLES = ''' -- name: One way to avoid apt_key once it is removed from your distro +- name: One way to avoid apt_key once it is removed from your distro, armored keys should use .asc extension, binary should use .gpg block: - - name: somerepo |no apt key + - name: somerepo | no apt key ansible.builtin.get_url: - url: https://download.example.com/linux/ubuntu/gpg - dest: /etc/apt/keyrings/somerepo.asc + url: https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x36a1d7869245c8950f966e92d8576a8ba88d21e9 + dest: /etc/apt/keyrings/myrepo.asc - name: somerepo | apt source ansible.builtin.apt_repository: diff --git a/lib/ansible/modules/apt_repository.py b/lib/ansible/modules/apt_repository.py index 5179be91f4d..17bebce425f 100644 --- a/lib/ansible/modules/apt_repository.py +++ b/lib/ansible/modules/apt_repository.py @@ -26,6 +26,8 @@ attributes: platforms: debian notes: - This module supports Debian Squeeze (version 6) as well as its successors and derivatives. +seealso: + - module: ansible.builtin.deb822_repository options: repo: description: