Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to use new GPG Key Mgmt for APT #392

Open
misilot opened this issue Feb 20, 2024 · 1 comment
Open

Update to use new GPG Key Mgmt for APT #392

misilot opened this issue Feb 20, 2024 · 1 comment

Comments

@misilot
Copy link
Contributor

misilot commented Feb 20, 2024

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: present
@misilot
Copy link
Contributor Author

misilot commented Feb 21, 2024

There is this new module ansible.builtin.deb822_repository

Examples: https://gist.github.com/roib20/27fde10af195cee1c1f8ac5f68be7e9b

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant