-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Description
apt_key is depreciated and when running apt-get update locally you get the following
W: http://ppa.launchpad.net/deadsnakes/ppa/ubuntu/dists/jammy/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
W: http://packages.archivematica.org/1.15.x/ubuntu-externals/dists/jammy/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
Taken from https://docs.ansible.com/ansible/latest/collections/ansible/builtin/apt_repository_module.html this looks like the new way to manage GPG keys for the repositories.
- name: One way to avoid apt_key once it is removed from your distro
block:
- name: somerepo |no apt key
ansible.builtin.get_url:
url: https://download.example.com/linux/ubuntu/gpg
dest: /etc/apt/keyrings/somerepo.asc
- name: somerepo | apt source
ansible.builtin.apt_repository:
repo: "deb [arch=amd64 signed-by=/etc/apt/keyrings/myrepo.asc] https://download.example.com/linux/ubuntu {{ ansible_distribution_release }} stable"
state: presentMetadata
Metadata
Assignees
Labels
No labels