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

🐛 Fix MariaDB apt-key is deprecated failure #1515

Merged
merged 3 commits into from
Apr 23, 2024
Merged

Conversation

retlehs
Copy link
Member

@retlehs retlehs commented Apr 18, 2024

@retlehs retlehs self-assigned this Apr 18, 2024
Comment on lines 2 to 12
- name: Download MariaDB GPG key
ansible.builtin.get_url:
url: "https://mariadb.org/mariadb_release_signing_key.asc"
dest: "/tmp/mariadb_release_signing_key.asc"
mode: '0644'

- name: Add the MariaDB GPG key to apt
ansible.builtin.shell:
cmd: "apt-key add /tmp/mariadb_release_signing_key.asc"
args:
removes: "/tmp/mariadb_release_signing_key.asc"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use the built-in url feature of apt_key? https://docs.ansible.com/ansible/latest/collections/ansible/builtin/apt_key_module.html

- name: Add an Apt signing key, uses whichever key is at the URL
  ansible.builtin.apt_key:
    url: https://ftp-master.debian.org/keys/archive-key-6.0.asc
    state: present

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fatal: [default]: FAILED! => {"after": ["D94AA3F0EFE21092", "871920D1991BC93C"], "before": ["D94AA3F0EFE21092", "871920D1991BC93C"], "changed": true, "fp": "AED4B06F473041FA", "id": "AED4B06F473041FA", "key_id": "AED4B06F473041FA", "msg": "apt-key did not return an error, but failed to add the key (check that the id is correct and *not* a subkey)", "short_id": "473041FA"}

@retlehs retlehs merged commit 801a825 into master Apr 23, 2024
2 checks passed
@retlehs retlehs deleted the mariadb-apt-key branch April 23, 2024 14:51
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

Successfully merging this pull request may close these issues.

2 participants